Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BitCode] Autoupgrade inline asm elementtype attribute
This is the autoupgrade part of D116531. If old bitcode is missing the elementtype attribute for indirect inline asm constraints, automatically add it. As usual, this only works when upgrading in typed mode, we haven't figured out upgrade in opaque mode yet.
- Loading branch information
Showing
3 changed files
with
58 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
; RUN: llvm-dis < %s.bc | FileCheck %s | ||
|
||
; CHECK: call void asm "", "=*rm,r"(i32* elementtype(i32) %p1, i32* %p2) | ||
define void @test_call(i32* %p1, i32* %p2) { | ||
call void asm "", "=*rm,r"(i32* %p1, i32* %p2) | ||
ret void | ||
} | ||
|
||
; CHECK: invoke void asm "", "=*rm,r"(i32* elementtype(i32) %p1, i32* %p2) | ||
define void @test_invoke(i32* %p1, i32* %p2) personality i8* null { | ||
invoke void asm "", "=*rm,r"(i32* %p1, i32* %p2) | ||
to label %cont unwind label %lpad | ||
|
||
lpad: | ||
%lp = landingpad i32 | ||
cleanup | ||
ret void | ||
|
||
cont: | ||
ret void | ||
} | ||
|
||
; CHECK: callbr void asm "", "=*rm,r"(i32* elementtype(i32) %p1, i32* %p2) | ||
define void @test_callbr(i32* %p1, i32* %p2) { | ||
callbr void asm "", "=*rm,r"(i32* %p1, i32* %p2) | ||
to label %cont [] | ||
|
||
cont: | ||
ret void | ||
} |
Binary file not shown.