forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AArch64: treat MC expressions as 2s complement arithmetic.
We had a couple of over-zealous diagnostics that meant IR with a reasonable and valid interpretation was rejected.
- Loading branch information
1 parent
7d01bb8
commit 38348fa
Showing
2 changed files
with
9 additions
and
16 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,9 @@ | ||
; RUN: llc -mtriple=arm64-apple-ios %s -filetype=obj -o - | llvm-objdump --macho --section __DATA,__data - | FileCheck %s | ||
|
||
; CHECK: Contents of (__DATA,__data) section | ||
; CHECK: 0000002a 59ed145d | ||
@other = global i32 42 | ||
@var = global i32 sub(i32 646102975, | ||
i32 add (i32 trunc(i64 sub(i64 ptrtoint(i32* @var to i64), | ||
i64 ptrtoint(i32* @other to i64)) to i32), | ||
i32 3432360802)) |