1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/test/Bitcode/upgrade-invariant-group-barrier.ll
sstefan1 34a5b0392e [IR] Make nosync, nofree and willreturn default for intrinsics.
D70365 allows us to make attributes default. This is a follow up to
actually make nosync, nofree and willreturn default. The approach we
chose, for now, is to opt-in to default attributes to avoid introducing
problems to target specific intrinsics. Intrinsics with default
attributes can be created using `DefaultAttrsIntrinsic` class.
2020-10-20 11:57:19 +02:00

23 lines
1.1 KiB
LLVM

; RUN: opt -S < %s | FileCheck %s
; The intrinsic firstly only took i8*, then it was made polimorphic, then
; it was renamed to launder.invariant.group
define void @test(i8* %p1, i16* %p16) {
; CHECK-LABEL: @test
; CHECK: %p2 = call i8* @llvm.launder.invariant.group.p0i8(i8* %p1)
; CHECK: %p3 = call i8* @llvm.launder.invariant.group.p0i8(i8* %p1)
; CHECK: %p4 = call i16* @llvm.launder.invariant.group.p0i16(i16* %p16)
%p2 = call i8* @llvm.invariant.group.barrier(i8* %p1)
%p3 = call i8* @llvm.invariant.group.barrier.p0i8(i8* %p1)
%p4 = call i16* @llvm.invariant.group.barrier.p0i16(i16* %p16)
ret void
}
; CHECK: Function Attrs: inaccessiblememonly nofree nosync nounwind speculatable willreturn
; CHECK: declare i8* @llvm.launder.invariant.group.p0i8(i8*)
; CHECK: Function Attrs: inaccessiblememonly nofree nosync nounwind speculatable willreturn
; CHECK: declare i16* @llvm.launder.invariant.group.p0i16(i16*)
declare i8* @llvm.invariant.group.barrier(i8*)
declare i8* @llvm.invariant.group.barrier.p0i8(i8*)
declare i16* @llvm.invariant.group.barrier.p0i16(i16*)