-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
asm mode: allow refinement of a memory byte with a ptr with an integer
Type punning through memory is perfectly fine in asm
- Loading branch information
1 parent
3e1e364
commit 1352eaa
Showing
3 changed files
with
43 additions
and
9 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
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,15 @@ | ||
; TEST-ARGS: -tgt-is-asm | ||
; SKIP-IDENTITY | ||
|
||
@dst = external global i64 | ||
@ptr = external global ptr | ||
|
||
define void @src() { | ||
store ptr @dst, ptr @ptr, align 8 | ||
ret void | ||
} | ||
|
||
define void @tgt() { | ||
store i64 ptrtoint (ptr @dst to i64), ptr @ptr, align 8 | ||
ret void | ||
} |