1 ; RUN: opt -passes='require<profile-summary>,function(codegenprepare)' -S -mtriple=x86_64 < %s | FileCheck %s
5 ; CHECK-LABEL: define void @foo() {
8 ; CHECK-NOT: !invariant.group
9 ; CHECK-NOT: @llvm.launder.invariant.group.p0(
10 ; CHECK: %val = load i8, ptr @tmp, align 1{{$}}
11 %val = load i8, ptr @tmp, !invariant.group !0
12 %ptr = call ptr @llvm.launder.invariant.group.p0(ptr @tmp)
14 ; CHECK: store i8 42, ptr @tmp, align 1{{$}}
15 store i8 42, ptr %ptr, !invariant.group !0
21 ; CHECK-LABEL: define void @foo2() {
24 ; CHECK-NOT: !invariant.group
25 ; CHECK-NOT: @llvm.strip.invariant.group.p0(
26 ; CHECK: %val = load i8, ptr @tmp, align 1{{$}}
27 %val = load i8, ptr @tmp, !invariant.group !0
28 %ptr = call ptr @llvm.strip.invariant.group.p0(ptr @tmp)
30 ; CHECK: store i8 42, ptr @tmp, align 1{{$}}
31 store i8 42, ptr %ptr, !invariant.group !0
38 declare ptr @llvm.launder.invariant.group.p0(ptr)
39 declare ptr @llvm.strip.invariant.group.p0(ptr)