mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Revert "Disable InstCombine unsafe folding bitcasts of calls w/ varargs."
This reverts commit d0e277d272
.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149647 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -30,6 +30,20 @@ define i32 @test2(i32 %A) {
|
||||
}
|
||||
|
||||
|
||||
; Resolving this should insert a cast from sbyte to int, following the C
|
||||
; promotion rules.
|
||||
define void @test3a(i8, ...) {unreachable }
|
||||
|
||||
define void @test3(i8 %A, i8 %B) {
|
||||
call void bitcast (void (i8, ...)* @test3a to void (i8, i8)*)( i8 %A, i8 %B
|
||||
)
|
||||
ret void
|
||||
; CHECK: %1 = zext i8 %B to i32
|
||||
; CHECK: call void (i8, ...)* @test3a(i8 %A, i32 %1)
|
||||
; CHECK: ret void
|
||||
}
|
||||
|
||||
|
||||
; test conversion of return value...
|
||||
define i8 @test4a() {
|
||||
ret i8 0
|
||||
|
Reference in New Issue
Block a user