diff options
author | Sam Parker <sam.parker@arm.com> | 2019-09-30 07:52:10 +0000 |
---|---|---|
committer | Sam Parker <sam.parker@arm.com> | 2019-09-30 07:52:10 +0000 |
commit | b3438f1cc040ec37ca437ce48b6373298b4ecf9a (patch) | |
tree | 2fca9158ddeb716b6e3e5c1f8fbc657dd8d6950f /llvm/lib/Target/ARM/ARMCodeGenPrepare.cpp | |
parent | 1249126c7c616a160a3d43c68aec87f478c7bccb (diff) | |
download | bcm5719-llvm-b3438f1cc040ec37ca437ce48b6373298b4ecf9a.tar.gz bcm5719-llvm-b3438f1cc040ec37ca437ce48b6373298b4ecf9a.zip |
[ARM][CGP] Allow signext arguments
As we perform a zext on any arguments used in the promoted tree, it
doesn't matter if they're marked as signext. The only permitted
user(s) in the tree which would interpret the sign bits are signed
icmps. For these instructions, their promoted operands are truncated
before the icmp uses them.
Differential Revision: https://reviews.llvm.org/D68019
llvm-svn: 373186
Diffstat (limited to 'llvm/lib/Target/ARM/ARMCodeGenPrepare.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMCodeGenPrepare.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/Target/ARM/ARMCodeGenPrepare.cpp b/llvm/lib/Target/ARM/ARMCodeGenPrepare.cpp index 9c8da29febf..1c2c8aef55b 100644 --- a/llvm/lib/Target/ARM/ARMCodeGenPrepare.cpp +++ b/llvm/lib/Target/ARM/ARMCodeGenPrepare.cpp @@ -179,9 +179,6 @@ public: } static bool GenerateSignBits(Value *V) { - if (auto *Arg = dyn_cast<Argument>(V)) - return Arg->hasSExtAttr(); - if (!isa<Instruction>(V)) return false; @@ -843,8 +840,8 @@ bool ARMCodeGenPrepare::isSupportedValue(Value *V) { } } else if (isa<Constant>(V) && !isa<ConstantExpr>(V)) { return isSupportedType(V); - } else if (auto *Arg = dyn_cast<Argument>(V)) - return isSupportedType(V) && !Arg->hasSExtAttr(); + } else if (isa<Argument>(V)) + return isSupportedType(V); return isa<BasicBlock>(V); } |