[NFC][RemoveDIs] Prefer iterators over inst-pointers in InstCombine
[llvm-project.git] / llvm / test / CodeGen / AArch64 / GlobalISel / combine-fsqrt.mir
blobe114d017931675a7e4fc3fae793930e3fc23b85f
1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs -mtriple aarch64-unknown-unknown %s -o - | FileCheck %s
4 ---
5 name:            test_combine_half_fsqrt_constant
6 body:             |
7   bb.1:
8   liveins:
9     ; CHECK-LABEL: name: test_combine_half_fsqrt_constant
10     ; CHECK: [[C:%[0-9]+]]:_(s16) = G_FCONSTANT half 0xH4000
11     ; CHECK: $h0 = COPY [[C]](s16)
12     %0:_(s16) = G_FCONSTANT half 4.000000e+00
13     %1:_(s16) = G_FSQRT %0
14     $h0 = COPY %1
15 ...
16 ---
17 name:            test_combine_float_fsqrt_constant
18 body:             |
19   bb.1:
20   liveins:
21     ; CHECK-LABEL: name: test_combine_float_fsqrt_constant
22     ; CHECK: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float 2.000000e+00
23     ; CHECK: $w0 = COPY [[C]](s32)
24     %0:_(s32) = G_FCONSTANT float 4.000000e+00
25     %1:_(s32) = G_FSQRT %0
26     $w0 = COPY %1
27 ...
28 ---
29 name:            test_combine_double_fsqrt_constant
30 body:             |
31   bb.1:
32   liveins:
33     ; CHECK-LABEL: name: test_combine_double_fsqrt_constant
34     ; CHECK: [[C:%[0-9]+]]:_(s64) = G_FCONSTANT double 2.000000e+00
35     ; CHECK: $x0 = COPY [[C]](s64)
36     %0:_(s64) = G_FCONSTANT double 4.000000e+00
37     %1:_(s64) = G_FSQRT %0
38     $x0 = COPY %1
39 ...