getName(".insert"));
}
- Value *Store = IRB.CreateStore(Src, DstPtr, II.isVolatile());
- (void)Store;
+ StoreInst *Store = cast<StoreInst>(IRB.CreateStore(Src, DstPtr,
+ II.isVolatile()));
+ Store->setAlignment(II.getAlignment());
DEBUG(dbgs() << " to: " << *Store << "\n");
return !II.isVolatile();
}
; CHECK-NOT: alloca
; CHECK: ret void
; PR13916
+
entry:
%A = alloca %test22.struct
br i1 undef, label %if.then, label %if.end
%tmp2 = load %test22.struct* %A
ret void
}
+
+define void @test23(<2 x i64> %a, i16* %b) {
+; CHECK: @test23
+; CHECK: store {{.*}}, align 2
+; CHECK: ret void
+; PR13920
+
+entry:
+ %a.addr = alloca <2 x i64>, align 16
+ store <2 x i64> %a, <2 x i64>* %a.addr, align 16
+ %0 = bitcast i16* %b to i8*
+ %1 = bitcast <2 x i64>* %a.addr to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %0, i8* %1, i32 16, i32 2, i1 false)
+ ret void
+}