-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong register used on apple-m1 #74680
Labels
Comments
@llvm/issue-subscribers-backend-aarch64 Author: DianQK (DianQK)
I tried this IR/MIR:
; ModuleID = 'repro_117902.54923e0577e9cdaf-cgu.0'
source_filename = "repro_117902.54923e0577e9cdaf-cgu.0"
target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
target triple = "arm64-apple-macosx11.0.0"
define i1 @<!-- -->foo(i32 %self.0.val, i8 %self.4.val) #<!-- -->1 {
start:
switch i32 %self.0.val, label %bb2 [
i32 0, label %bb9
i32 1, label %bb4
i32 2, label %bb5
i32 3, label %bb1
]
bb2: ; preds = %start
unreachable
bb4: ; preds = %start
br label %bb9
bb5: ; preds = %start
br label %bb9
bb1: ; preds = %start
%trunc.not = icmp eq i8 %self.4.val, 0
br label %bb9
bb9: ; preds = %bb1, %start, %bb5, %bb4
%r = phi i1 [ true, %bb5 ], [ true, %bb4 ], [ false, %start ], [ %trunc.not, %bb1 ]
ret i1 %r
}
attributes #<!-- -->1 = { "frame-pointer"="non-leaf" "target-cpu"="apple-m1" } I got:
If I run with
I think the first instruction should be I'm not familiar with the MIR. But it looks like postrapseudos created godbolt: https://llvm.godbolt.org/z/1hfYvrGPG |
I tried to submit a patch #74682. |
This was referenced Dec 7, 2023
Closed
DianQK
added a commit
that referenced
this issue
Dec 14, 2023
… the X register (#75184) Follows #74682 (comment). Fixes #74680.
nikic
pushed a commit
to rust-lang/llvm-project
that referenced
this issue
Dec 14, 2023
… the X register (llvm#75184) Follows llvm#74682 (comment). Fixes llvm#74680. (cherry picked from commit 7649d22)
MingcongBai
pushed a commit
to AOSC-Tracking/llvm-project
that referenced
this issue
Mar 26, 2024
… the X register (llvm#75184) Follows llvm#74682 (comment). Fixes llvm#74680. (cherry picked from commit 7649d22)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried this IR/MIR:
I got:
If I run with
-O1
:I think the first instruction should be
mov w8, w0
.I'm not familiar with the MIR. But it looks like postrapseudos created
mov x8, x0
in lowercopy.Then machine-cp removes late
mov w8, w0
.godbolt: https://llvm.godbolt.org/z/1hfYvrGPG
from: rust-lang/rust#117902
The text was updated successfully, but these errors were encountered: