1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/test/Transforms/CodeGenPrepare/invariant.group.ll
Piotr Padlewski 7016a01b0d Introducing llvm.invariant.group.barrier intrinsic
For more info for what reason it was invented, goto:
http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html

invariant.group.barrier:
http://reviews.llvm.org/D12310
docs:
http://reviews.llvm.org/D11399
CodeGenPrepare:
http://reviews.llvm.org/D12875

llvm-svn: 247711
2015-09-15 18:32:14 +00:00

23 lines
538 B
LLVM

; RUN: opt -codegenprepare -S < %s | FileCheck %s
@tmp = global i8 0
; CHECK-LABEL: define void @foo() {
define void @foo() {
enter:
; CHECK-NOT: !invariant.group
; CHECK-NOT: @llvm.invariant.group.barrier(
; CHECK: %val = load i8, i8* @tmp
%val = load i8, i8* @tmp, !invariant.group !0
%ptr = call i8* @llvm.invariant.group.barrier(i8* @tmp)
; CHECK: store i8 42, i8* @tmp
store i8 42, i8* %ptr, !invariant.group !0
ret void
}
; CHECK-LABEL: }
declare i8* @llvm.invariant.group.barrier(i8*)
!0 = !{!"something"}