summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-08-29 15:27:17 +0000
committerSanjay Patel <spatel@rotateright.com>2016-08-29 15:27:17 +0000
commit25475bcc0c3e656d7e03dcc483e12601033f55a0 (patch)
tree68ccfa8c6bef12f0c310f0b93ffc51f9babdf7da /llvm/test
parent20f02b271b30f266b3f84a0a366408c8e0a129d4 (diff)
downloadbcm5719-llvm-25475bcc0c3e656d7e03dcc483e12601033f55a0.tar.gz
bcm5719-llvm-25475bcc0c3e656d7e03dcc483e12601033f55a0.zip
[Constant] remove fdiv and frem from canTrap()
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 the fdiv/frem in IR with isSafeToSpeculativelyExecute() and in the backend after: https://reviews.llvm.org/rL279970 llvm-svn: 279973
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/SimplifyCFG/ConditionalTrappingConstantExpr.ll9
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/test/Transforms/SimplifyCFG/ConditionalTrappingConstantExpr.ll b/llvm/test/Transforms/SimplifyCFG/ConditionalTrappingConstantExpr.ll
index 029cda3bbc6..13cd8e5ad63 100644
--- a/llvm/test/Transforms/SimplifyCFG/ConditionalTrappingConstantExpr.ll
+++ b/llvm/test/Transforms/SimplifyCFG/ConditionalTrappingConstantExpr.ll
@@ -48,16 +48,13 @@ bb7:
ret i32 927
}
-; FIXME: FP ops don't trap by default, so this is safe to hoist.
+; FP ops don't trap by default, so this is safe to hoist.
define i32 @tarp(i1 %c) {
; CHECK-LABEL: @tarp(
-; CHECK-NEXT: br i1 %c, label %bb8, label %bb9
-; CHECK: bb8:
+; CHECK-NEXT: bb9:
; CHECK-NEXT: [[DOT:%.*]] = select i1 fcmp oeq (float fdiv (float 3.000000e+00, float sitofp (i32 ptrtoint (i32* @G to i32) to float)), float 1.000000e+00), i32 42, i32 927
-; CHECK-NEXT: br label %bb9
-; CHECK: bb9:
-; CHECK-NEXT: [[MERGE:%.*]] = phi i32 [ 42, %0 ], [ [[DOT]], %bb8 ]
+; CHECK-NEXT: [[MERGE:%.*]] = select i1 %c, i32 [[DOT]], i32 42
; CHECK-NEXT: ret i32 [[MERGE]]
;
br i1 %c, label %bb8, label %bb9
OpenPOWER on IntegriCloud