[PATCH] D99376: [AMDGPU] Mark additional VOP3 as commutable
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 26 02:02:30 PDT 2021
foad requested changes to this revision.
foad added inline comments.
This revision now requires changes to proceed.
================
Comment at: llvm/lib/Target/AMDGPU/VOP3Instructions.td:644
+ defm V_ADD_I32 : VOP3Inst <"v_add_i32", VOP3_Profile<VOP_I32_I32_I32_ARITH>>;
+ defm V_SUB_I32 : VOP3Inst <"v_sub_i32", VOP3_Profile<VOP_I32_I32_I32_ARITH>>;
+} // End isCommutable = 1
----------------
Subtraction is not commutative!
================
Comment at: llvm/lib/Target/AMDGPU/VOP3Instructions.td:648
defm V_LSHL_ADD_U32 : VOP3Inst <"v_lshl_add_u32", VOP3_Profile<VOP_I32_I32_I32_I32>>;
defm V_ADD_LSHL_U32 : VOP3Inst <"v_add_lshl_u32", VOP3_Profile<VOP_I32_I32_I32_I32>>;
defm V_LSHL_OR_B32 : VOP3Inst <"v_lshl_or_b32", VOP3_Profile<VOP_I32_I32_I32_I32>>;
----------------
add_lshl is (s0 + s1) << s2 which is commutative.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99376/new/
https://reviews.llvm.org/D99376
More information about the llvm-commits
mailing list