[PATCH] D115884: [AMDGPU] Expand not pattern according to the XOR node divergence

Alexander via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 17 04:59:09 PST 2021


alex-t added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIInstructions.td:2120
+def : GCNPat <
+  (i32 (UniformBinFrag<xor> i32:$src0, (i32 -1))),
+  (S_NOT_B32 $src0)
----------------
rampitec wrote:
> foad wrote:
> > There are already patterns on the definitions of S_NOT_* in SOPInstructions.td. Can you update those, instead of adding new standalone patterns?
> +1.
The pattern in SOPInstructions.td works with the explicit "not" PatFrag. What if there is no "not" but the "xor src, -1" that was produced by the earlier DAG transformations?
Are you quite sure that this scenario never happens? 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115884



More information about the llvm-commits mailing list