[PATCH] D103147: [SelectionDAG][RISCV] Don't unroll 0/1-type bool VSELECTs
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 26 09:41:27 PDT 2021
craig.topper added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp:1192
+ auto BoolContents = TLI.getBooleanContents(Op1.getValueType());
+ if (BoolContents == TargetLowering::UndefinedBooleanContent ||
+ (BoolContents == TargetLowering::ZeroOrOneBooleanContent &&
----------------
I wonder if this would be better as
```
if (BoolContents != TargetLowering::ZeroOrNegativeOneBooleanContent &&
!(BoolContents == TargetLowering::ZeroOrOneBooleanContent && Op1.getValueType().getVectorElementType() != MVT::i1)
```
That way if some new boolean contents type gets added, only the values that are known to work get through.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103147/new/
https://reviews.llvm.org/D103147
More information about the llvm-commits
mailing list