diff options
| author | Sam Parker <sam.parker@arm.com> | 2018-11-09 15:06:33 +0000 |
|---|---|---|
| committer | Sam Parker <sam.parker@arm.com> | 2018-11-09 15:06:33 +0000 |
| commit | 2804f32ec4609c98d4cfa56065c7bc2dd3dabcb3 (patch) | |
| tree | ce8a7e2a34367083b0c4c58d6b3b5ac093ba858b /llvm/lib | |
| parent | fa1c0fe478dbcc2276d7cb58fe2adaf2fee9097c (diff) | |
| download | bcm5719-llvm-2804f32ec4609c98d4cfa56065c7bc2dd3dabcb3.tar.gz bcm5719-llvm-2804f32ec4609c98d4cfa56065c7bc2dd3dabcb3.zip | |
[ARM] Don't promote i1 types in ARM CGP
Now that we have mixed type sizes, i1 values need to be explicitly
handled as we want to avoid promoting these values.
Differential Revision: https://reviews.llvm.org/D54308
llvm-svn: 346499
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMCodeGenPrepare.cpp | 4 |
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; |

