[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / CodeGen / AMDGPU / GlobalISel / inst-select-amdgcn.fract.mir
blob479f14661ee33db6ee8b9727fbfa172544a9202a
1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=tahiti -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
3 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
5 ---
6 name: fract_s32_vs
7 legalized: true
8 regBankSelected: true
9 tracksRegLiveness: true
11 body: |
12   bb.0:
13     liveins: $sgpr0
15     ; CHECK-LABEL: name: fract_s32_vs
16     ; CHECK: liveins: $sgpr0
17     ; CHECK: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
18     ; CHECK: [[V_FRACT_F32_e64_:%[0-9]+]]:vgpr_32 = V_FRACT_F32_e64 0, [[COPY]], 0, 0, implicit $exec
19     ; CHECK: S_ENDPGM 0, implicit [[V_FRACT_F32_e64_]]
20     %0:sgpr(s32) = COPY $sgpr0
21     %1:vgpr(s32) = G_INTRINSIC intrinsic(@llvm.amdgcn.fract), %0
22     S_ENDPGM 0, implicit %1
23 ...
25 ---
26 name: fract_s32_vv
27 legalized: true
28 regBankSelected: true
29 tracksRegLiveness: true
31 body: |
32   bb.0:
33     liveins: $vgpr0
35     ; CHECK-LABEL: name: fract_s32_vv
36     ; CHECK: liveins: $vgpr0
37     ; CHECK: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
38     ; CHECK: [[V_FRACT_F32_e64_:%[0-9]+]]:vgpr_32 = V_FRACT_F32_e64 0, [[COPY]], 0, 0, implicit $exec
39     ; CHECK: S_ENDPGM 0, implicit [[V_FRACT_F32_e64_]]
40     %0:vgpr(s32) = COPY $vgpr0
41     %1:vgpr(s32) = G_INTRINSIC intrinsic(@llvm.amdgcn.fract), %0
42     S_ENDPGM 0, implicit %1
43 ...
45 ---
46 name: fract_s64_vs
47 legalized: true
48 regBankSelected: true
49 tracksRegLiveness: true
51 body: |
52   bb.0:
53     liveins: $sgpr0_sgpr1
55     ; CHECK-LABEL: name: fract_s64_vs
56     ; CHECK: liveins: $sgpr0_sgpr1
57     ; CHECK: [[COPY:%[0-9]+]]:sreg_64_xexec = COPY $sgpr0_sgpr1
58     ; CHECK: [[V_FRACT_F64_e64_:%[0-9]+]]:vreg_64 = V_FRACT_F64_e64 0, [[COPY]], 0, 0, implicit $exec
59     ; CHECK: S_ENDPGM 0, implicit [[V_FRACT_F64_e64_]]
60     %0:sgpr(s64) = COPY $sgpr0_sgpr1
61     %1:vgpr(s64) = G_INTRINSIC intrinsic(@llvm.amdgcn.fract), %0
62     S_ENDPGM 0, implicit %1
63 ...
65 ---
66 name: fract_s64_vv
67 legalized: true
68 regBankSelected: true
69 tracksRegLiveness: true
71 body: |
72   bb.0:
73     liveins: $vgpr0_vgpr1
75     ; CHECK-LABEL: name: fract_s64_vv
76     ; CHECK: liveins: $vgpr0_vgpr1
77     ; CHECK: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
78     ; CHECK: [[V_FRACT_F64_e64_:%[0-9]+]]:vreg_64 = V_FRACT_F64_e64 0, [[COPY]], 0, 0, implicit $exec
79     ; CHECK: S_ENDPGM 0, implicit [[V_FRACT_F64_e64_]]
80     %0:vgpr(s64) = COPY $vgpr0_vgpr1
81     %1:vgpr(s64) = G_INTRINSIC intrinsic(@llvm.amdgcn.fract), %0
82     S_ENDPGM 0, implicit %1
83 ...