mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-12 03:32:10 +00:00
return attributes on the floor. In the case of a call to a varargs function where the varargs arguments are being removed, any call attributes on those arguments need to be dropped. I didn't do this because I plan to make it illegal to have such attributes (see next patch). With this change, compiling the gcc filter2 eh test at -O0 and then running opt -std-compile-opts on it results in a correctly working program (compiling at -O1 or higher results in the test failing due to a problem with how we output eh info into the IR). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45285 91177308-0d34-0410-b5e6-96231b3b80d8
17 lines
538 B
LLVM
17 lines
538 B
LLVM
; RUN: llvm-as < %s | opt -deadargelim | llvm-dis | grep nounwind | count 2
|
|
; RUN: llvm-as < %s | opt -deadargelim | llvm-dis | grep signext | count 2
|
|
; RUN: llvm-as < %s | opt -deadargelim | llvm-dis | not grep inreg
|
|
; RUN: llvm-as < %s | opt -deadargelim | llvm-dis | not grep zeroext
|
|
|
|
@g = global i8 0
|
|
|
|
define internal i8 @foo(i8* inreg %p, i8 signext %y, ... ) zeroext nounwind {
|
|
store i8 %y, i8* @g
|
|
ret i8 0
|
|
}
|
|
|
|
define i32 @bar() {
|
|
%A = call i8(i8*, i8, ...)* @foo(i8* inreg null, i8 signext 1, i8 2) zeroext nounwind
|
|
ret i32 0
|
|
}
|