[PATCH] D58220: [AMDGPU] Ressociate 'add (add x, y), z' to use SALU

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 14 06:18:00 PST 2019


arsenm added inline comments.


================
Comment at: lib/Target/AMDGPU/SIISelLowering.cpp:8532-8534
+  // add x, (add y, z) -> add (add x, z), y, if x and z are uniform
+  if (RHS->isDivergent() ^ LHS->isDivergent()) {
+    SDValue Op0 = LHS, Op1 = RHS;
----------------
Maybe move this to a helper function with the opcode as a parameter like ReassociateOps. We probably want to do this for the other reassociatable opcodes next


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

https://reviews.llvm.org/D58220





More information about the llvm-commits mailing list