[llvm] r259437 - [LVI] Missing test case from 259432

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 1 15:44:38 PST 2016


Author: reames
Date: Mon Feb  1 17:44:38 2016
New Revision: 259437

URL: http://llvm.org/viewvc/llvm-project?rev=259437&view=rev
Log:
[LVI] Missing test case from 259432


Modified:
    llvm/trunk/test/Transforms/CorrelatedValuePropagation/select.ll

Modified: llvm/trunk/test/Transforms/CorrelatedValuePropagation/select.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/CorrelatedValuePropagation/select.ll?rev=259437&r1=259436&r2=259437&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/CorrelatedValuePropagation/select.ll (original)
+++ llvm/trunk/test/Transforms/CorrelatedValuePropagation/select.ll Mon Feb  1 17:44:38 2016
@@ -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
+}




More information about the llvm-commits mailing list