summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2016-02-01 23:44:38 +0000
committerPhilip Reames <listmail@philipreames.com>2016-02-01 23:44:38 +0000
commitf3b94694c08f4f8fa290c8ffc94210abff7a7fe8 (patch)
tree4f8dea7137b7ad2943759b885cd7f217514f61e5
parentf91b22ce2cb295da994a3488fd4ccb80410aa6bc (diff)
downloadbcm5719-llvm-f3b94694c08f4f8fa290c8ffc94210abff7a7fe8.tar.gz
bcm5719-llvm-f3b94694c08f4f8fa290c8ffc94210abff7a7fe8.zip
[LVI] Missing test case from 259432
llvm-svn: 259437
-rw-r--r--llvm/test/Transforms/CorrelatedValuePropagation/select.ll25
1 files changed, 25 insertions, 0 deletions
diff --git a/llvm/test/Transforms/CorrelatedValuePropagation/select.ll b/llvm/test/Transforms/CorrelatedValuePropagation/select.ll
index bad8e6b74f5..cab88766113 100644
--- a/llvm/test/Transforms/CorrelatedValuePropagation/select.ll
+++ b/llvm/test/Transforms/CorrelatedValuePropagation/select.ll
@@ -142,3 +142,28 @@ exit:
ret i1 true
}
+; Conflicting constants (i.e. isOverdefined result)
+; NOTE: Using doubles in this version is a bit of a hack. This
+; is to get around the fact that all integers (including constants
+; and non-constants) are actually represented as constant-ranges.
+define i1 @test4(i32* %p, i32 %qval, i1 %unknown) {
+; CHECK-LABEL: test4
+ %pval = load i32, i32* %p
+ %cmp1 = icmp slt i32 %pval, 255
+ br i1 %cmp1, label %next, label %exit
+
+next:
+ %min = select i1 %unknown, double 1.0, double 0.0
+ ;; TODO: This pointless branch shouldn't be neccessary
+ br label %next2
+next2:
+; CHECK-LABEL: next2
+; CHECK: ret i1 %res
+ %res = fcmp oeq double %min, 300.0
+ ret i1 %res
+
+exit:
+; CHECK-LABEL: exit:
+; CHECK: ret i1 true
+ ret i1 true
+}
OpenPOWER on IntegriCloud