57 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 62; RUN: opt -S -passes=instcombine < %s | FileCheck %s3 4@g0 = global <4 x i32> zeroinitializer, align 165 6define inreg <4 x i32> @mload1(ptr nocapture readonly %a0) #0 {7; CHECK-LABEL: define inreg <4 x i32> @mload1(8; CHECK-SAME: ptr readonly captures(none) [[A0:%.*]]) #[[ATTR0:[0-9]+]] {9; CHECK-NEXT: [[B0:.*:]]10; CHECK-NEXT: [[UNMASKEDLOAD:%.*]] = load <4 x i32>, ptr [[A0]], align 16, !tbaa [[CHAR_TBAA0:![0-9]+]]11; CHECK-NEXT: ret <4 x i32> [[UNMASKEDLOAD]]12;13b0:14 %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 !015 ret <4 x i32> %v016}17 18define inreg <4 x i32> @mload2() #0 {19; CHECK-LABEL: define inreg <4 x i32> @mload2(20; CHECK-SAME: ) #[[ATTR0]] {21; CHECK-NEXT: [[B0:.*:]]22; CHECK-NEXT: [[UNMASKEDLOAD:%.*]] = load <4 x i32>, ptr @g0, align 16, !tbaa [[CHAR_TBAA0]]23; CHECK-NEXT: [[V01:%.*]] = insertelement <4 x i32> [[UNMASKEDLOAD]], i32 0, i64 024; CHECK-NEXT: ret <4 x i32> [[V01]]25;26b0:27 %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 !028 ret <4 x i32> %v029}30 31define void @mstore(<4 x i32> %a0, ptr nocapture readonly %a1) #0 {32; CHECK-LABEL: define void @mstore(33; CHECK-SAME: <4 x i32> [[A0:%.*]], ptr readonly captures(none) [[A1:%.*]]) #[[ATTR0]] {34; CHECK-NEXT: [[B0:.*:]]35; CHECK-NEXT: store <4 x i32> [[A0]], ptr [[A1]], align 16, !tbaa [[CHAR_TBAA0]]36; CHECK-NEXT: ret void37;38b0:39 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 !040 ret void41}42 43attributes #0 = { norecurse nounwind }44 45declare <4 x i32> @llvm.masked.load.v4i1.p0(ptr, i32, <4 x i1>, <4 x i32>)46declare void @llvm.masked.store.v4i1.p0(<4 x i32>, ptr, i32, <4 x i1>)47 48!0 = !{!1, !1, i64 0}49!1 = !{!"omnipotent char", !2, i64 0}50!2 = !{!"Simple C/C++ TBAA"}51 52;.53; CHECK: [[CHAR_TBAA0]] = !{[[META1:![0-9]+]], [[META1]], i64 0}54; CHECK: [[META1]] = !{!"omnipotent char", [[META2:![0-9]+]], i64 0}55; CHECK: [[META2]] = !{!"Simple C/C++ TBAA"}56;.57