1; RUN: opt -codegenprepare -S < %s | FileCheck %s 2 3@tmp = global i8 0 4 5; CHECK-LABEL: define void @foo() { 6define void @foo() { 7enter: 8 ; CHECK-NOT: !invariant.group 9 ; CHECK-NOT: @llvm.launder.invariant.group.p0i8( 10 ; CHECK: %val = load i8, i8* @tmp{{$}} 11 %val = load i8, i8* @tmp, !invariant.group !0 12 %ptr = call i8* @llvm.launder.invariant.group.p0i8(i8* @tmp) 13 14 ; CHECK: store i8 42, i8* @tmp{{$}} 15 store i8 42, i8* %ptr, !invariant.group !0 16 17 ret void 18} 19; CHECK-LABEL: } 20 21; CHECK-LABEL: define void @foo2() { 22define void @foo2() { 23enter: 24 ; CHECK-NOT: !invariant.group 25 ; CHECK-NOT: @llvm.strip.invariant.group.p0i8( 26 ; CHECK: %val = load i8, i8* @tmp{{$}} 27 %val = load i8, i8* @tmp, !invariant.group !0 28 %ptr = call i8* @llvm.strip.invariant.group.p0i8(i8* @tmp) 29 30 ; CHECK: store i8 42, i8* @tmp{{$}} 31 store i8 42, i8* %ptr, !invariant.group !0 32 33 ret void 34} 35; CHECK-LABEL: } 36 37 38declare i8* @llvm.launder.invariant.group.p0i8(i8*) 39declare i8* @llvm.strip.invariant.group.p0i8(i8*) 40!0 = !{} 41