Skip to content

Commit 4a7ffeb

Browse files
arsenmSisyph
andauthored
Update llvm/lib/Target/AMDGPU/SIInstructions.td
Co-authored-by: Joe Nash <[email protected]>
1 parent 49c8245 commit 4a7ffeb

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

llvm/lib/Target/AMDGPU/SIInstructions.td

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2163,7 +2163,18 @@ def : GCNPat <
21632163
(S_MOV_B32 $ga)
21642164
>;
21652165

2166-
def : GCNPat <
2166+
foreach pred = [NotHasTrue16BitInsts, UseFakeTrue16Insts] in {
2167+
let True16Predicate = pred in
2168+
def : GCNPat <
2169+
(VGPRImm<(i16 imm)>:$imm),
2170+
(V_MOV_B32_e32 imm:$imm)
2171+
>;
2172+
}
2173+
let True16Predicate = UseRealTrue16Insts in
2174+
def : GCNPat <
2175+
(VGPRImm<(i16 imm)>:$imm),
2176+
(V_MOV_B16_t16_e64 0, imm:$imm, 0)
2177+
>;
21672178
(VGPRImm<(i16 imm)>:$imm),
21682179
(V_MOV_B32_e32 imm:$imm)
21692180
>;

0 commit comments

Comments
 (0)