1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -passes=instcombine < %s | FileCheck %s
4 @g0 = global <4 x i32> zeroinitializer, align 16
6 define inreg <4 x i32> @mload1(ptr nocapture readonly %a0) #0 {
7 ; CHECK-LABEL: @mload1(
9 ; CHECK-NEXT: [[UNMASKEDLOAD:%.*]] = load <4 x i32>, ptr [[A0:%.*]], align 16, !tbaa [[TBAA0:![0-9]+]]
10 ; CHECK-NEXT: ret <4 x i32> [[UNMASKEDLOAD]]
13 %v0 = call <4 x i32> @llvm.masked.load.v4i1.p0(ptr %a0, i32 16, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x i32> undef), !tbaa !0
17 define inreg <4 x i32> @mload2() #0 {
18 ; CHECK-LABEL: @mload2(
20 ; CHECK-NEXT: [[UNMASKEDLOAD:%.*]] = load <4 x i32>, ptr @g0, align 16, !tbaa [[TBAA0]]
21 ; CHECK-NEXT: [[V01:%.*]] = insertelement <4 x i32> [[UNMASKEDLOAD]], i32 0, i64 0
22 ; CHECK-NEXT: ret <4 x i32> [[V01]]
25 %v0 = call <4 x i32> @llvm.masked.load.v4i1.p0(ptr @g0, i32 16, <4 x i1> <i1 false, i1 true, i1 true, i1 true>, <4 x i32> zeroinitializer), !tbaa !0
29 define void @mstore(<4 x i32> %a0, ptr nocapture readonly %a1) #0 {
30 ; CHECK-LABEL: @mstore(
32 ; CHECK-NEXT: store <4 x i32> [[A0:%.*]], ptr [[A1:%.*]], align 16, !tbaa [[TBAA0]]
33 ; CHECK-NEXT: ret void
36 call void @llvm.masked.store.v4i1.p0(<4 x i32> %a0, ptr %a1, i32 16, <4 x i1> <i1 true, i1 true, i1 true, i1 true>), !tbaa !0
40 attributes #0 = { norecurse nounwind }
42 declare <4 x i32> @llvm.masked.load.v4i1.p0(ptr, i32, <4 x i1>, <4 x i32>)
43 declare void @llvm.masked.store.v4i1.p0(<4 x i32>, ptr, i32, <4 x i1>)
46 !1 = !{!"omnipotent char", !2, i64 0}
47 !2 = !{!"Simple C/C++ TBAA"}