summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMCodeGenPrepare.cpp
diff options
context:
space:
mode:
authorSam Parker <sam.parker@arm.com>2019-09-30 07:52:10 +0000
committerSam Parker <sam.parker@arm.com>2019-09-30 07:52:10 +0000
commitb3438f1cc040ec37ca437ce48b6373298b4ecf9a (patch)
tree2fca9158ddeb716b6e3e5c1f8fbc657dd8d6950f /llvm/lib/Target/ARM/ARMCodeGenPrepare.cpp
parent1249126c7c616a160a3d43c68aec87f478c7bccb (diff)
downloadbcm5719-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.cpp7
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);
}
OpenPOWER on IntegriCloud