[PATCH] D117210: [CodeGen] Support folds of not(cmp(cc, ...)) -> cmp(!cc, ...) for scalable vectors
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 17 03:45:05 PST 2022
david-arm added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:3175
+ isa<ConstantSDNode>(N->getOperand(0))) {
+ CVal = cast<ConstantSDNode>(N->getOperand(0))->getAPIntValue();
} else {
----------------
frasercrmck wrote:
> I think we have to support the truncating case as with `BUILD_VECTOR` above, don't we?
Hmm, I looked at the definition of SPLAT_VECTOR and you're right - the operand is allowed to be wider than the vector element type of the result. I hadn't realised that :(. The only problem is that I have absolutely no idea how to write a test case for this using IR! I'm not sure if there is a way to create a splat (using SPLAT_VECTOR) in IR that is truncating. Unless you know of any RISCV examples where this would happen?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117210/new/
https://reviews.llvm.org/D117210
More information about the llvm-commits
mailing list