[llvm] [AMDGPU] Add commute for some VOP3 inst (PR #121326)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 2 05:29:53 PST 2025
================
@@ -15,3 +14,14 @@ body: |
DS_WRITE2_B32_gfx9 undef %4:vgpr_32, %2, %3, 0, 1, 0, implicit $exec
...
+---
+name: test_machine_cse_op_inline_const
+body: |
+ ; GCN-LABEL: name: test_machine_cse_op_inline_const
+ ; GCN: %0:vgpr_32 = V_ADD_NC_U16_e64 0, 64, 0, -3, 1, 0, implicit $mode, implicit $exec
+ ; GCN-NEXT: DS_WRITE2_B32_gfx9 undef %2:vgpr_32, %0, %0, 0, 1, 0, implicit $exec
+ bb.0:
+ %1:vgpr_32 = V_ADD_NC_U16_e64 0, 64, 0, -3, 1, 0, implicit $mode, implicit $exec
+ %2:vgpr_32 = V_ADD_NC_U16_e64 0, -3, 0, 64, 1, 0, implicit $mode, implicit $exec
+ DS_WRITE2_B32_gfx9 undef %4:vgpr_32, %1, %2, 0, 1, 0, implicit $exec
+...
----------------
arsenm wrote:
There should be a dedicated commute test for every changed opcode like this. What about the _e32 forms?
https://github.com/llvm/llvm-project/pull/121326
More information about the llvm-commits
mailing list