[PATCH] D116270: [AMDGPU] Enable divergence-driven XNOR selection
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 31 03:57:19 PST 2021
foad added a reviewer: foad.
foad added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/VOP2Instructions.td:714
+def : GCNPat<
+ (i32 (DivergentUnaryFrag<not> (xor_oneuse i32:$src0, i32:$src1))),
----------------
Why are these two patterns required? Surely we can just let the NOT and the XOR be selected individually. The only effect of these patterns is to swap the order of the NOT and the XOR, but if that is beneficial then surely it should be done as a DAG combine instead?
================
Comment at: llvm/lib/Target/AMDGPU/VOPInstructions.td:797
+class DivergentUnaryFrag<SDPatternOperator Op> : PatFrag <
+ (ops node:$src0),
----------------
Please rebase this patch on D116241.
================
Comment at: llvm/test/CodeGen/AMDGPU/divergence-driven-xnor.ll:1
+; RUN: llc -march=amdgcn -stop-after=amdgpu-isel < %s | FileCheck -check-prefix=GCN %s
+
----------------
Also run this test on a subtarget that has v_xnor instructions?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116270/new/
https://reviews.llvm.org/D116270
More information about the llvm-commits
mailing list