1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -global-isel -march=amdgcn -mcpu=gfx1010 -run-pass=amdgpu-postlegalizer-combiner -verify-machineinstrs %s -o - | FileCheck -check-prefix=GCN %s
10 ; CHECK: $vgpr0 = COPY %3
11 ; CHECK: SI_RETURN_TO_EPILOG implicit $vgpr0
12 ; GCN-LABEL: name: rcp_sqrt_test
13 ; GCN: [[COPY:%[0-9]+]]:_(s32) = COPY $sgpr0
14 ; GCN: [[INT:%[0-9]+]]:_(s32) = afn G_INTRINSIC intrinsic(@llvm.amdgcn.rsq), [[COPY]](s32)
15 ; GCN: $vgpr0 = COPY [[INT]](s32)
16 ; GCN: SI_RETURN_TO_EPILOG implicit $vgpr0
17 %0:_(s32) = COPY $sgpr0
18 %2:_(s32) = G_FSQRT %0:_
19 %3:_(s32) = afn G_INTRINSIC intrinsic(@llvm.amdgcn.rcp), %2:_(s32)
20 $vgpr0 = COPY %3:_(s32)
21 SI_RETURN_TO_EPILOG implicit $vgpr0
31 ; GCN-LABEL: name: sqrt_rcp_test
32 ; GCN: [[COPY:%[0-9]+]]:_(s32) = COPY $sgpr0
33 ; GCN: [[INT:%[0-9]+]]:_(s32) = G_INTRINSIC intrinsic(@llvm.amdgcn.rsq), [[COPY]](s32)
34 ; GCN: $vgpr0 = COPY [[INT]](s32)
35 ; GCN: SI_RETURN_TO_EPILOG implicit $vgpr0
36 %0:_(s32) = COPY $sgpr0
37 %2:_(s32) = afn G_INTRINSIC intrinsic(@llvm.amdgcn.rcp), %0:_(s32)
38 %3:_(s32) = G_FSQRT %2:_
39 $vgpr0 = COPY %3:_(s32)
40 SI_RETURN_TO_EPILOG implicit $vgpr0