Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3443373

Browse files
author
git apple-llvm automerger
committed
Merge commit '172051a1f4b1' from llvm.org/main into next
2 parents d8f565b + 172051a commit 3443373

File tree

5 files changed

+30
-13
lines changed

5 files changed

+30
-13
lines changed

llvm/lib/Target/AArch64/AArch64Combine.td

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,6 @@ def AArch64PostLegalizerCombinerHelper
212212
form_bitfield_extract, rotate_out_of_range,
213213
icmp_to_true_false_known_bits, merge_unmerge,
214214
select_combines, fold_merge_to_zext,
215-
constant_fold]> {
215+
constant_fold, identity_combines]> {
216216
let DisableRuleOption = "aarch64postlegalizercombiner-disable-rule";
217217
}

llvm/test/CodeGen/AArch64/GlobalISel/arm64-atomic-128.ll

+4-8
Original file line numberDiff line numberDiff line change
@@ -350,10 +350,8 @@ define void @atomic_load_relaxed(i64, i64, i128* %p, i128* %p2) {
350350
; CHECK-LLSC-O1-NEXT: .LBB4_1: // %atomicrmw.start
351351
; CHECK-LLSC-O1-NEXT: // =>This Inner Loop Header: Depth=1
352352
; CHECK-LLSC-O1-NEXT: ldxp x9, x8, [x2]
353-
; CHECK-LLSC-O1-NEXT: lsr x8, x8, #0
354-
; CHECK-LLSC-O1-NEXT: lsr x10, x8, #0
355-
; CHECK-LLSC-O1-NEXT: stxp w11, x9, x10, [x2]
356-
; CHECK-LLSC-O1-NEXT: cbnz w11, .LBB4_1
353+
; CHECK-LLSC-O1-NEXT: stxp w10, x9, x8, [x2]
354+
; CHECK-LLSC-O1-NEXT: cbnz w10, .LBB4_1
357355
; CHECK-LLSC-O1-NEXT: // %bb.2: // %atomicrmw.end
358356
; CHECK-LLSC-O1-NEXT: mov v0.d[0], x9
359357
; CHECK-LLSC-O1-NEXT: mov v0.d[1], x8
@@ -365,10 +363,8 @@ define void @atomic_load_relaxed(i64, i64, i128* %p, i128* %p2) {
365363
; CHECK-CAS-O1-NEXT: .LBB4_1: // %atomicrmw.start
366364
; CHECK-CAS-O1-NEXT: // =>This Inner Loop Header: Depth=1
367365
; CHECK-CAS-O1-NEXT: ldxp x9, x8, [x2]
368-
; CHECK-CAS-O1-NEXT: lsr x8, x8, #0
369-
; CHECK-CAS-O1-NEXT: lsr x10, x8, #0
370-
; CHECK-CAS-O1-NEXT: stxp w11, x9, x10, [x2]
371-
; CHECK-CAS-O1-NEXT: cbnz w11, .LBB4_1
366+
; CHECK-CAS-O1-NEXT: stxp w10, x9, x8, [x2]
367+
; CHECK-CAS-O1-NEXT: cbnz w10, .LBB4_1
372368
; CHECK-CAS-O1-NEXT: // %bb.2: // %atomicrmw.end
373369
; CHECK-CAS-O1-NEXT: mov v0.d[0], x9
374370
; CHECK-CAS-O1-NEXT: mov v0.d[1], x8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2+
# RUN: llc -mtriple aarch64 -run-pass=aarch64-postlegalizer-combiner -verify-machineinstrs %s -o - | FileCheck %s
3+
4+
---
5+
name: shift_of_zero
6+
alignment: 4
7+
legalized: true
8+
liveins:
9+
- { reg: '$w0' }
10+
body: |
11+
bb.1.entry:
12+
liveins: $x0
13+
14+
; CHECK-LABEL: name: shift_of_zero
15+
; CHECK: %a:_(s64) = COPY $x0
16+
; CHECK: $x0 = COPY %a(s64)
17+
; CHECK: RET_ReallyLR implicit $x0
18+
%a:_(s64) = COPY $x0
19+
%b:_(s64) = G_CONSTANT i64 0
20+
%res:_(s64) = G_LSHR %a, %b
21+
$x0 = COPY %res(s64)
22+
RET_ReallyLR implicit $x0
23+
24+
...

llvm/test/CodeGen/AArch64/GlobalISel/postlegalizercombiner-select.mir

+1-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ body: |
99
liveins: $x0, $x1
1010
; CHECK-LABEL: name: test_combine_select_same_res
1111
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
12-
; CHECK: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[COPY]](s64)
13-
; CHECK: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[TRUNC]](s1), [[COPY]], [[COPY]]
14-
; CHECK: $x0 = COPY [[SELECT]](s64)
12+
; CHECK: $x0 = COPY [[COPY]](s64)
1513
%0:_(s64) = COPY $x0
1614
%1:_(s1) = G_TRUNC %0
1715
%2:_(s64) = G_SELECT %1, %0, %0

llvm/test/CodeGen/AArch64/fold-global-offsets.ll

-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ define i32 @f7() {
133133
; GISEL-NEXT: mov v0.d[1], x8
134134
; GISEL-NEXT: mov d0, v0.d[1]
135135
; GISEL-NEXT: fmov x8, d0
136-
; GISEL-NEXT: lsr x8, x8, #0
137136
; GISEL-NEXT: ldr w0, [x8, #20]
138137
; GISEL-NEXT: ret
139138

0 commit comments

Comments
 (0)