With opaque pointers, no actual bitcasts will be present. Instead, there will be a mismatch between the call FunctionType and the function ValueType. Change the code to collect CallBases specifically (rather than general Uses) and compare these types. RAUW is no longer performed, as there would no longer be any bitcasts that can be RAUWd. Differential Revision: https://reviews.llvm.org/D108880
19 lines
428 B
LLVM
19 lines
428 B
LLVM
; RUN: llc < %s -asm-verbose=false | FileCheck %s
|
|
; RUN: llc < %s -asm-verbose=false -force-opaque-pointers | FileCheck %s
|
|
|
|
; Test main functions with alternate signatures.
|
|
|
|
target triple = "wasm32-unknown-unknown"
|
|
|
|
declare i32 @main()
|
|
|
|
define i32 @foo() {
|
|
%t = call i32 @main()
|
|
ret i32 %t
|
|
}
|
|
|
|
; CHECK-LABEL: foo:
|
|
; CHECK-NEXT: .functype foo () -> (i32)
|
|
; CHECK-NEXT: call __original_main
|
|
; CHECK-NEXT: end_function
|