summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetLoweringBase.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-08-29 13:32:41 +0000
committerSanjay Patel <spatel@rotateright.com>2016-08-29 13:32:41 +0000
commitb57d0a2fda00fd50f78dc89802b457072194a75a (patch)
tree7fcd003f9fb42b5ccff06d1c172cebf054593114 /llvm/lib/CodeGen/TargetLoweringBase.cpp
parent0a955d6dcb8108d7a4fdd9aec0f46fab5e447230 (diff)
downloadbcm5719-llvm-b57d0a2fda00fd50f78dc89802b457072194a75a.tar.gz
bcm5719-llvm-b57d0a2fda00fd50f78dc89802b457072194a75a.zip
[TargetLowering] remove fdiv and frem from canOpTrap() (PR29114)
Assuming the default FP env, we should not treat fdiv and frem any differently in terms of trapping behavior than any other FP op. Ie, FP ops do not trap with the default FP env. This matches how we treat these ops in IR with isSafeToSpeculativelyExecute(). There's a similar bug in Constant::canTrap(). This bug manifests in PR29114: https://llvm.org/bugs/show_bug.cgi?id=29114 ...as a sequence of scalar divisions instead of a vector division on x86 for a <3 x float> type. Differential Revision: https://reviews.llvm.org/D23974 llvm-svn: 279970
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringBase.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp
index 62a3499a276..85c277a5025 100644
--- a/llvm/lib/CodeGen/TargetLoweringBase.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp
@@ -955,15 +955,11 @@ EVT TargetLoweringBase::getShiftAmountTy(EVT LHSTy,
return getScalarShiftAmountTy(DL, LHSTy);
}
-/// canOpTrap - Returns true if the operation can trap for the value type.
-/// VT must be a legal type.
bool TargetLoweringBase::canOpTrap(unsigned Op, EVT VT) const {
assert(isTypeLegal(VT));
switch (Op) {
default:
return false;
- case ISD::FDIV:
- case ISD::FREM:
case ISD::SDIV:
case ISD::UDIV:
case ISD::SREM:
OpenPOWER on IntegriCloud