File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,8 @@ bool AArch64PostCoalescer::runOnMachineFunction(MachineFunction &MF) {
7272 case AArch64::COALESCER_BARRIER_FPR128: {
7373 Register Src = MI.getOperand (1 ).getReg ();
7474 Register Dst = MI.getOperand (0 ).getReg ();
75+ if (MRI->hasOneDef (Dst) && !MRI->use_empty (Dst))
76+ continue ;
7577 if (Src != Dst)
7678 MRI->replaceRegWith (Dst, Src);
7779
Original file line number Diff line number Diff line change 1+ ; RUN: llc -mtriple=aarch64 -mattr=+sme -stop-ater=aarch64-post-coalescer-pass < %s | FileCheck %s
2+
3+ ; CHECK-LABEL: name: bar
4+ ; CHECK: [[dst:%[0-9]+]]:fpr64 = COALESCER_BARRIER_FPR64 undef [[src:%[0-9]+]]
5+
6+ target triple = "aarch64"
7+
8+ declare void @foo (double ) "aarch64_pstate_sm_enabled"
9+
10+ define dso_local void @bar (double noundef %a ) local_unnamed_addr {
11+ entry:
12+ tail call void @foo (double poison) "aarch64_pstate_sm_enabled"
13+ ret void
14+ }
You can’t perform that action at this time.
0 commit comments