fix rdar://9289583 - fast isel should handle non-canonical commutative binops
[oota-llvm.git] / test / Transforms / ScalarRepl / 2009-12-11-NeonTypes.ll
index a8f5cf71bf82b18c43ba549d9b354a731473cf57..31d9bae6be28c557a3d36433e182139b04f71dfe 100644 (file)
@@ -9,7 +9,7 @@ target triple = "thumbv7-apple-darwin10"
 %struct.int16x8x2_t = type { [2 x %struct.int16x8_t] }
 %union..0anon = type { %struct.int16x8x2_t }
 
-define arm_apcscc void @test(<8 x i16> %tmp.0, %struct.int16x8x2_t* %dst) nounwind {
+define void @test(<8 x i16> %tmp.0, %struct.int16x8x2_t* %dst) nounwind {
 ; CHECK: @test
 ; CHECK-NOT: alloca
 ; CHECK: "alloca point"
@@ -65,4 +65,25 @@ return:                                           ; preds = %entry
   ret void
 }
 
+; Radar 7466574
+%struct._NSRange = type { i64 }
+
+define void @test_memcpy_self() nounwind {
+; CHECK: @test_memcpy_self
+; CHECK-NOT: alloca
+; CHECK: br i1
+entry:
+  %range = alloca %struct._NSRange                ; <%struct._NSRange*> [#uses=2]
+  br i1 undef, label %cond.true, label %cond.false
+
+cond.true:                                        ; preds = %entry
+  %tmp3 = bitcast %struct._NSRange* %range to i8* ; <i8*> [#uses=1]
+  %tmp4 = bitcast %struct._NSRange* %range to i8* ; <i8*> [#uses=1]
+  call void @llvm.memcpy.i32(i8* %tmp3, i8* %tmp4, i32 8, i32 8)
+  ret void
+
+cond.false:                                       ; preds = %entry
+  ret void
+}
+
 declare void @llvm.memcpy.i32(i8* nocapture, i8* nocapture, i32, i32) nounwind