forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AMDGCN] Use ZExt when handling indices in insertment element instruc…
…tion. This patch fixes llvm#85717 Signed-off-by: Peter Rong <PeterRong96@gmail.com>
- Loading branch information
1 parent
e5f2ed3
commit fe2d2aa
Showing
2 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 | ||
;RUN: llc -mtriple=amdgcn -mcpu=gfx1036 < %s | FileCheck %s | ||
define void @test(i1 %Bool, ptr %Ptr, <32 x float> %Vec1, <32 x float> %Vec2) { | ||
; CHECK-LABEL: test: | ||
; CHECK: ; %bb.0: ; %BB0 | ||
; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) | ||
; CHECK-NEXT: s_mov_b32 vcc_lo, exec_lo | ||
; CHECK-NEXT: .LBB0_1: ; %BB1 | ||
; CHECK-NEXT: ; =>This Inner Loop Header: Depth=1 | ||
; CHECK-NEXT: s_cbranch_vccnz .LBB0_1 | ||
; CHECK-NEXT: ; %bb.2: ; %DummyReturnBlock | ||
; CHECK-NEXT: s_setpc_b64 s[30:31] | ||
BB0: | ||
%I = insertelement <32 x float> %Vec1, float 4.200000e+01, i1 true | ||
br label %BB1 | ||
|
||
BB1: ; preds = %BB0, %BB1, %BB2 | ||
%PHI = phi <32 x float> [ %I, %BB2 ], [ %Vec2, %BB1 ], [ zeroinitializer, %BB0 ] | ||
store <32 x float> %PHI, ptr %Ptr, align 128 | ||
br i1 %Bool, label %BB1, label %BB2 | ||
|
||
BB2: ; preds = %BB1 | ||
br label %BB1 | ||
} |