Revert " [LoongArch][ISel] Check the number of sign bits in `PatGprGpr_32` (#107432)"
[llvm-project.git] / llvm / test / CodeGen / AArch64 / GlobalISel / combine-unary-undef-to-zero.mir
blob1c5f5cbd17b3b09aa23909e82145ec83b3cf6473
1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-unknown-unknown -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs -o - %s | FileCheck %s
4 # Test unary_op(undef) -> 0 combines
6 ...
7 ---
8 name:            abs_scalar
9 tracksRegLiveness: true
10 body:             |
11   bb.0:
12     liveins: $w0
13     ; CHECK-LABEL: name: abs_scalar
14     ; CHECK: liveins: $w0
15     ; CHECK-NEXT: {{  $}}
16     ; CHECK-NEXT: %abs:_(s32) = G_CONSTANT i32 0
17     ; CHECK-NEXT: $w0 = COPY %abs(s32)
18     ; CHECK-NEXT: RET_ReallyLR implicit $w0
19     %undef:_(s32) = G_IMPLICIT_DEF
20     %abs:_(s32) = G_ABS %undef
21     $w0 = COPY %abs(s32)
22     RET_ReallyLR implicit $w0
23 ...
24 ---
25 name:            abs_vector
26 tracksRegLiveness: true
27 body:             |
28   bb.0:
29     liveins: $d0
30     ; CHECK-LABEL: name: abs_vector
31     ; CHECK: liveins: $d0
32     ; CHECK-NEXT: {{  $}}
33     ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
34     ; CHECK-NEXT: %abs:_(<2 x s32>) = G_BUILD_VECTOR [[C]](s32), [[C]](s32)
35     ; CHECK-NEXT: $d0 = COPY %abs(<2 x s32>)
36     ; CHECK-NEXT: RET_ReallyLR implicit $d0
37     %undef:_(<2 x s32>) = G_IMPLICIT_DEF
38     %abs:_(<2 x s32>) = G_ABS %undef
39     $d0 = COPY %abs(<2 x s32>)
40     RET_ReallyLR implicit $d0
41 ...