1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test/Bitcode/objectsize-upgrade-7.0.ll
Matt Arsenault 01d726ce5c IR: Add immarg attribute
This indicates an intrinsic parameter is required to be a constant,
and should not be replaced with a non-constant value.

Add the attribute to all AMDGPU and generic intrinsics that comments
indicate it should apply to. I scanned other target intrinsics, but I
don't see any obvious comments indicating which arguments are intended
to be only immediates.

This breaks one questionable testcase for the autoupgrade. I'm unclear
on whether the autoupgrade is supposed to really handle declarations
which were never valid. The verifier fails because the attributes now
refer to a parameter past the end of the argument list.

llvm-svn: 355981
2019-03-12 21:02:54 +00:00

13 lines
459 B
LLVM

; RUN: llvm-dis < %s.bc | FileCheck %s
; Bitcode compatibility test for 'dynamic' parameter to llvm.objectsize.
define void @callit(i8* %ptr) {
%sz = call i64 @llvm.objectsize.i64.p0i8(i8* %ptr, i1 false, i1 true)
; CHECK: %sz = call i64 @llvm.objectsize.i64.p0i8(i8* %ptr, i1 false, i1 true, i1 false)
ret void
}
declare i64 @llvm.objectsize.i64.p0i8(i8*, i1, i1)
; CHECK: declare i64 @llvm.objectsize.i64.p0i8(i8*, i1 immarg, i1 immarg, i1 immarg)