summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMCodeGenPrepare.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/ARM/ARMCodeGenPrepare.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMCodeGenPrepare.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMCodeGenPrepare.cpp b/llvm/lib/Target/ARM/ARMCodeGenPrepare.cpp
index 06949bea70a..75c72df2f3e 100644
--- a/llvm/lib/Target/ARM/ARMCodeGenPrepare.cpp
+++ b/llvm/lib/Target/ARM/ARMCodeGenPrepare.cpp
@@ -206,7 +206,8 @@ static bool isSupportedType(Value *V) {
if (auto *Ld = dyn_cast<LoadInst>(V))
Ty = cast<PointerType>(Ld->getPointerOperandType())->getElementType();
- if (!isa<IntegerType>(Ty))
+ if (!isa<IntegerType>(Ty) ||
+ cast<IntegerType>(V->getType())->getBitWidth() == 1)
return false;
return LessOrEqualTypeSize(V);
@@ -222,6 +223,7 @@ static bool isSupportedType(Value *V) {
static bool isSource(Value *V) {
if (!isa<IntegerType>(V->getType()))
return false;
+
// TODO Allow zext to be sources.
if (isa<Argument>(V))
return true;
OpenPOWER on IntegriCloud