1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -run-pass=legalizer -o - %s | FileCheck -check-prefix=GFX6 %s 3# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -run-pass=legalizer -o - %s | FileCheck -check-prefix=GFX9 %s 4 5--- 6name: test_fpowi_s16_s32_flags 7body: | 8 bb.0: 9 liveins: $vgpr0, $vgpr1 10 11 ; GFX6-LABEL: name: test_fpowi_s16_s32_flags 12 ; GFX6: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0 13 ; GFX6: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1 14 ; GFX6: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32) 15 ; GFX6: [[FPEXT:%[0-9]+]]:_(s32) = G_FPEXT [[TRUNC]](s16) 16 ; GFX6: [[SITOFP:%[0-9]+]]:_(s32) = G_SITOFP [[COPY1]](s32) 17 ; GFX6: [[FLOG2_:%[0-9]+]]:_(s32) = nnan G_FLOG2 [[FPEXT]] 18 ; GFX6: [[INT:%[0-9]+]]:_(s32) = nnan G_INTRINSIC intrinsic(@llvm.amdgcn.fmul.legacy), [[FLOG2_]](s32), [[SITOFP]](s32) 19 ; GFX6: [[FEXP2_:%[0-9]+]]:_(s32) = nnan G_FEXP2 [[INT]] 20 ; GFX6: [[FPTRUNC:%[0-9]+]]:_(s16) = G_FPTRUNC [[FEXP2_]](s32) 21 ; GFX6: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[FPTRUNC]](s16) 22 ; GFX6: $vgpr0 = COPY [[ANYEXT]](s32) 23 ; GFX9-LABEL: name: test_fpowi_s16_s32_flags 24 ; GFX9: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0 25 ; GFX9: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1 26 ; GFX9: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32) 27 ; GFX9: [[SITOFP:%[0-9]+]]:_(s16) = G_SITOFP [[COPY1]](s32) 28 ; GFX9: [[FLOG2_:%[0-9]+]]:_(s16) = nnan G_FLOG2 [[TRUNC]] 29 ; GFX9: [[FPEXT:%[0-9]+]]:_(s32) = nnan G_FPEXT [[FLOG2_]](s16) 30 ; GFX9: [[FPEXT1:%[0-9]+]]:_(s32) = nnan G_FPEXT [[SITOFP]](s16) 31 ; GFX9: [[INT:%[0-9]+]]:_(s32) = nnan G_INTRINSIC intrinsic(@llvm.amdgcn.fmul.legacy), [[FPEXT]](s32), [[FPEXT1]](s32) 32 ; GFX9: [[FPTRUNC:%[0-9]+]]:_(s16) = G_FPTRUNC [[INT]](s32) 33 ; GFX9: [[FEXP2_:%[0-9]+]]:_(s16) = nnan G_FEXP2 [[FPTRUNC]] 34 ; GFX9: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[FEXP2_]](s16) 35 ; GFX9: $vgpr0 = COPY [[ANYEXT]](s32) 36 %0:_(s32) = COPY $vgpr0 37 %1:_(s32) = COPY $vgpr1 38 %2:_(s16) = G_TRUNC %0 39 %3:_(s16) = nnan G_FPOWI %2, %1 40 %4:_(s32) = G_ANYEXT %3 41 $vgpr0 = COPY %4 42... 43 44--- 45name: test_fpowi_s32_s32_flags 46body: | 47 bb.0: 48 liveins: $vgpr0, $vgpr1 49 50 ; GFX6-LABEL: name: test_fpowi_s32_s32_flags 51 ; GFX6: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0 52 ; GFX6: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1 53 ; GFX6: [[SITOFP:%[0-9]+]]:_(s32) = G_SITOFP [[COPY1]](s32) 54 ; GFX6: [[FLOG2_:%[0-9]+]]:_(s32) = nnan G_FLOG2 [[COPY]] 55 ; GFX6: [[INT:%[0-9]+]]:_(s32) = nnan G_INTRINSIC intrinsic(@llvm.amdgcn.fmul.legacy), [[FLOG2_]](s32), [[SITOFP]](s32) 56 ; GFX6: [[FEXP2_:%[0-9]+]]:_(s32) = nnan G_FEXP2 [[INT]] 57 ; GFX6: $vgpr0 = COPY [[FEXP2_]](s32) 58 ; GFX9-LABEL: name: test_fpowi_s32_s32_flags 59 ; GFX9: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0 60 ; GFX9: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1 61 ; GFX9: [[SITOFP:%[0-9]+]]:_(s32) = G_SITOFP [[COPY1]](s32) 62 ; GFX9: [[FLOG2_:%[0-9]+]]:_(s32) = nnan G_FLOG2 [[COPY]] 63 ; GFX9: [[INT:%[0-9]+]]:_(s32) = nnan G_INTRINSIC intrinsic(@llvm.amdgcn.fmul.legacy), [[FLOG2_]](s32), [[SITOFP]](s32) 64 ; GFX9: [[FEXP2_:%[0-9]+]]:_(s32) = nnan G_FEXP2 [[INT]] 65 ; GFX9: $vgpr0 = COPY [[FEXP2_]](s32) 66 %0:_(s32) = COPY $vgpr0 67 %1:_(s32) = COPY $vgpr1 68 %2:_(s32) = nnan G_FPOWI %0, %1 69 $vgpr0 = COPY %2 70... 71