[PATCH] D115884: [AMDGPU] Expand not pattern according to the XOR node divergence
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 17 06:33:47 PST 2021
foad 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)
----------------
alex-t wrote:
> 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?
'not' is not a separate DAG node, it is just a named pattern that matches an xor with -1.
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