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.
12 lines
305 B
LLVM
12 lines
305 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 i8 return value.
|
|
|
|
define i8 @callee_MissingRetAttr() {
|
|
ret i8 -1
|
|
}
|
|
|
|
; CHECK: Narrow integer argument must have a valid extension type.
|