[PATCH] D102022: [AMDGPU] Expose __builtin_amdgcn_perm for v_perm_b32

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 6 15:24:10 PDT 2021


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/VOP3Instructions.td:424-427
+def : GCNPat<
+  (AMDGPUperm i32:$src0, i32:$src1, i32:$src2),
+  (V_PERM_B32_e64 $src0, $src1, $src2)
+>;
----------------
Can you avoid the second pattern by handling the two cases with a PatFrags as is done for other intrinsics? e.g.

```
def AMDGPUcos : PatFrags<(ops node:$src), [(int_amdgcn_cos node:$src),
                                           (AMDGPUcos_impl node:$src)]>;
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102022/new/

https://reviews.llvm.org/D102022



More information about the llvm-commits mailing list