[llvm] AMDGPU/GlobalISel: Partially move constant selection to patterns (PR #100786)
Joe Nash via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 29 10:57:50 PDT 2024
================
@@ -2163,6 +2163,11 @@ def : GCNPat <
(S_MOV_B32 $ga)
>;
+def : GCNPat <
----------------
Sisyph wrote:
```suggestion
foreach pred = [NotHasTrue16BitInsts, UseFakeTrue16Insts] in {
let True16Predicate = pred in
def : GCNPat <
(VGPRImm<(i16 imm)>:$imm),
(V_MOV_B32_e32 imm:$imm)
>;
}
let True16Predicate = UseRealTrue16Insts in
def : GCNPat <
(VGPRImm<(i16 imm)>:$imm),
(V_MOV_B16_t16_e64 0, imm:$imm, 0)
>;
```
https://github.com/llvm/llvm-project/pull/100786
More information about the llvm-commits
mailing list