[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / CodeGen / Mips / GlobalISel / instruction-select / fsqrt.mir
blob0759fc1ab5c2f65945612008651470f5419af141
1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=FP32
3 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -mattr=+fp64,+mips32r2 -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=FP64
4 --- |
6   define void @sqrt_f32() {entry: ret void}
7   define void @sqrt_f64() {entry: ret void}
9 ...
10 ---
11 name:            sqrt_f32
12 alignment:       4
13 legalized:       true
14 regBankSelected: true
15 tracksRegLiveness: true
16 body:             |
17   bb.1.entry:
18     liveins: $f12
20     ; FP32-LABEL: name: sqrt_f32
21     ; FP32: liveins: $f12
22     ; FP32: [[COPY:%[0-9]+]]:fgr32 = COPY $f12
23     ; FP32: [[FSQRT_S:%[0-9]+]]:fgr32 = FSQRT_S [[COPY]]
24     ; FP32: $f0 = COPY [[FSQRT_S]]
25     ; FP32: RetRA implicit $f0
26     ; FP64-LABEL: name: sqrt_f32
27     ; FP64: liveins: $f12
28     ; FP64: [[COPY:%[0-9]+]]:fgr32 = COPY $f12
29     ; FP64: [[FSQRT_S:%[0-9]+]]:fgr32 = FSQRT_S [[COPY]]
30     ; FP64: $f0 = COPY [[FSQRT_S]]
31     ; FP64: RetRA implicit $f0
32     %0:fprb(s32) = COPY $f12
33     %1:fprb(s32) = G_FSQRT %0
34     $f0 = COPY %1(s32)
35     RetRA implicit $f0
37 ...
38 ---
39 name:            sqrt_f64
40 alignment:       4
41 legalized:       true
42 regBankSelected: true
43 tracksRegLiveness: true
44 body:             |
45   bb.1.entry:
46     liveins: $d6
48     ; FP32-LABEL: name: sqrt_f64
49     ; FP32: liveins: $d6
50     ; FP32: [[COPY:%[0-9]+]]:afgr64 = COPY $d6
51     ; FP32: [[FSQRT_D32_:%[0-9]+]]:afgr64 = FSQRT_D32 [[COPY]]
52     ; FP32: $d0 = COPY [[FSQRT_D32_]]
53     ; FP32: RetRA implicit $d0
54     ; FP64-LABEL: name: sqrt_f64
55     ; FP64: liveins: $d6
56     ; FP64: [[COPY:%[0-9]+]]:fgr64 = COPY $d6
57     ; FP64: [[FSQRT_D64_:%[0-9]+]]:fgr64 = FSQRT_D64 [[COPY]]
58     ; FP64: $d0 = COPY [[FSQRT_D64_]]
59     ; FP64: RetRA implicit $d0
60     %0:fprb(s64) = COPY $d6
61     %1:fprb(s64) = G_FSQRT %0
62     $d0 = COPY %1(s64)
63     RetRA implicit $d0
65 ...