For the purpose of verifying proper arguments extensions per the target's ABI, introduce the NoExt attribute that may be used by a target when neither sign- or zeroextension is required (e.g. with a struct in register). The purpose of doing so is to be able to verify that there is always one of these attributes present and by this detecting cases where sign/zero extension is actually missing. As a first step, this patch has the verification step done for the SystemZ backend only, but left off by default until all known issues have been addressed. Other targets/front-ends can now also add NoExt attribute where needed and do this check in the backend.
15 lines
370 B
LLVM
15 lines
370 B
LLVM
; RUN: not --crash llc < %s -mtriple=s390x-linux-gnu -argext-abi-check 2>&1 \
|
|
; RUN: | FileCheck %s
|
|
; REQUIRES: asserts
|
|
;
|
|
; Test detection of missing extension of an outgoing i16 call argument.
|
|
|
|
define void @caller() {
|
|
call void @bar_Struct(i16 123)
|
|
ret void
|
|
}
|
|
|
|
declare void @bar_Struct(i16 %Arg)
|
|
|
|
; CHECK: Narrow integer argument must have a valid extension type
|