Add a testcase that would have noticed the typo fixed in commit 166475.
authorDuncan Sands <baldrick@free.fr>
Wed, 24 Oct 2012 07:17:20 +0000 (07:17 +0000)
committerDuncan Sands <baldrick@free.fr>
Wed, 24 Oct 2012 07:17:20 +0000 (07:17 +0000)
llvm-svn: 166547

llvm/test/Transforms/InstCombine/cast.ll

index 899ffddd5bca60cecd2ff8ad213fea38931d58ee..b4eb69d4363dd7d64496bca28251859b554a7bd3 100644 (file)
@@ -891,3 +891,12 @@ define double @test80([100 x double]* %p, i32 %i) {
   ret double %l
 ; CHECK-NEXT: ret double
 }
+
+define double @test81(double *%p, float %f) {
+  %i = fptosi float %f to i64
+  %q = bitcast double* %p to i8*
+  %pp = getelementptr i8* %q, i64 %i
+  %r = bitcast i8* %pp to double*
+  %l = load double* %r
+  ret double %l
+}