-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AArch64: copy all parts of the mem operand across when combining a store
In particular we were dropping volatility, which can lead to unwanted transformations.
- Loading branch information
1 parent
72ebcd3
commit edab411
Showing
2 changed files
with
11 additions
and
2 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,10 @@ | ||
; RUN: llc -mtriple=arm64-apple-ios %s -o - -stop-after=finalize-isel 2>&1 | FileCheck %s | ||
|
||
define void @foo(i64 %a, i64 %b, i32* %ptr) { | ||
; CHECK-LABEL: name: foo | ||
; CHECK: STRWui {{.*}} (volatile store (s32) into %ir.ptr) | ||
%sum = add i64 %a, 1 | ||
%sum.32 = trunc i64 %sum to i32 | ||
store volatile i32 %sum.32, i32* %ptr | ||
ret void | ||
} |