1 ; RUN: opt -codegenprepare -S < %s | FileCheck %s
5 ; CHECK-LABEL: define void @foo() {
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)
14 ; CHECK: store i8 42, i8* @tmp{{$}}
15 store i8 42, i8* %ptr, !invariant.group !0
21 ; CHECK-LABEL: define void @foo2() {
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)
30 ; CHECK: store i8 42, i8* @tmp{{$}}
31 store i8 42, i8* %ptr, !invariant.group !0
38 declare i8* @llvm.launder.invariant.group.p0i8(i8*)
39 declare i8* @llvm.strip.invariant.group.p0i8(i8*)