[PATCH] D50518: [ARM] Disallow zexts in ARMCodeGenPrepare
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 9 10:37:56 PDT 2018
rnk added a comment.
I'm not familiar enough with the code to stamp it, but thanks for fixing this!
================
Comment at: lib/Target/ARM/ARMCodeGenPrepare.cpp:517-518
bool ARMCodeGenPrepare::isLegalToPromote(Value *V) {
- if (!isSupportedType(V))
- return false;
-
- unsigned VSize = 0;
- if (auto *Ld = dyn_cast<LoadInst>(V)) {
- auto *PtrTy = cast<PointerType>(Ld->getPointerOperandType());
- VSize = PtrTy->getElementType()->getPrimitiveSizeInBits();
- } else if (auto *ZExt = dyn_cast<ZExtInst>(V)) {
- VSize = ZExt->getOperand(0)->getType()->getPrimitiveSizeInBits();
- } else {
- VSize = V->getType()->getPrimitiveSizeInBits();
- }
-
- if (VSize > TypeSize)
- return false;
+ //if (!isSupportedType(V))
+ //return false;
----------------
Commented out code not intended for commit?
================
Comment at: test/CodeGen/ARM/arm-cgp-zext-truncs.ll:267-270
+ switch i9 %trunc, label %cleanup.fold.split [
+ i9 0, label %cleanup
+ i9 -256, label %if.then7
+ ]
----------------
I take it this is a reduction of the test case I sent?
https://reviews.llvm.org/D50518
More information about the llvm-commits
mailing list