mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
7016a01b0d
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
23 lines
538 B
LLVM
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"} |