File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
llvm/test/CodeGen/AArch64 Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2
+ ; RUN: llc -mtriple=aarch64-linux-gnu -O3 < %s | FileCheck %s
3
+
4
+ ; Disable the dagcombine if operand has multi use
5
+
6
+ @g = global i16 0 , align 4
7
+ define i32 @srl_and () {
8
+ ; CHECK-LABEL: srl_and:
9
+ ; CHECK: // %bb.0: // %entry
10
+ ; CHECK-NEXT: adrp x8, :got:g
11
+ ; CHECK-NEXT: ldr x8, [x8, :got_lo12:g]
12
+ ; CHECK-NEXT: mov w9, #50
13
+ ; CHECK-NEXT: ldrh w8, [x8]
14
+ ; CHECK-NEXT: eor w8, w8, w9
15
+ ; CHECK-NEXT: sub w8, w8, #1
16
+ ; CHECK-NEXT: and w0, w8, w8, lsr #16
17
+ ; CHECK-NEXT: ret
18
+ entry:
19
+ %0 = load i16 , i16* @g , align 4
20
+ %1 = xor i16 %0 , 50
21
+ %tobool = icmp ne i16 %1 , 0
22
+ %lor.ext = zext i1 %tobool to i32
23
+ %sub = add i16 %1 , -1
24
+
25
+ %srl = zext i16 %sub to i32
26
+ %and = and i32 %srl , %lor.ext
27
+
28
+ ret i32 %and
29
+ }
You can’t perform that action at this time.
0 commit comments