[PATCH] D62613: [DAGCombiner] Replace gathers with a zero mask with the passthru value
Benjamin Kramer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 29 11:44:02 PDT 2019
bkramer marked 4 inline comments as done.
bkramer added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:8092
+ // Zap gathers with a zero mask.
+ if (isNullOrNullSplat(Mask))
+ return CombineTo(N, MGT->getPassThru(), MGT->getChain());
----------------
craig.topper wrote:
> I wonder if we should just use ISD::isBuildVectorAllZeros here.
That's indeed simpler. Why do we have so many of these things? :(
================
Comment at: llvm/test/CodeGen/AArch64/vecreduce-bool.ll:100
; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
+; CHECK-NEXT: cmlt v0.16b, v0.16b, #0
; CHECK-NEXT: uminv b0, v0.16b
----------------
craig.topper wrote:
> I assume this was caused by the isNullOrNullSplat change?
Yeah. It's a minor improvement. But I dropped this for now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62613/new/
https://reviews.llvm.org/D62613
More information about the llvm-commits
mailing list