[PATCH] D90605: [llvm][AArch64] Simplify (and (sign_extend..) #bitmask).
Owen Anderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 2 10:24:30 PST 2020
resistor added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:5742
+ auto *C = dyn_cast<ConstantSDNode>(RHS);
+ if (!C || !C->getAPIntValue().isMask())
+ return false;
----------------
I think it would be simpler to fetch `LHS.getOperand(0).getValueType().getSizeInBits()` and just do `C->getAPIntValue().isMask(SizeInBits)`
I believe that would obviate the need for most of the rest of the logic in here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90605/new/
https://reviews.llvm.org/D90605
More information about the llvm-commits
mailing list