[PATCH] D99376: [AMDGPU] Mark additional VOP3 as commutable

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 26 14:28:16 PDT 2021


rampitec requested changes to this revision.
rampitec 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
----------------
foad wrote:
> Subtraction is not commutative!
It is commutative since there is subrev, but it needs to define Commutable_REV<> which it does not.


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