brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 7552f6b Raw
43 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 62; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx900 -stop-after=amdgpu-isel < %s | FileCheck -check-prefixes=GCN-ISEL %s3; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx900 < %s | FileCheck %s4; Ensure that S_UADDO_PSEUDO is selected when carryout user is S_ADD_CO_PSEUDO5 6; GCN-ISEL-LABEL: name:   s_uaddo_pseudo7; GCN-ISEL-LABEL: body:8; GCN-ISEL: S_UADDO_PSEUDO9; GCN-ISEL: S_ADD_CO_PSEUDO10 11define amdgpu_ps i32 @s_uaddo_pseudo(i32 inreg %val0) {12; CHECK-LABEL: s_uaddo_pseudo:13; CHECK:       ; %bb.0:14; CHECK-NEXT:    s_add_u32 s0, s0, 115; CHECK-NEXT:    s_addc_u32 s0, 1, 016; CHECK-NEXT:    ; return to shader part epilog17  %pair = call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 %val0, i32 1)18  %carryout = extractvalue { i32, i1 } %pair, 119  %zext_carryout = zext i1 %carryout to i3220  %result = add i32 %zext_carryout, 121  ret i32 %result22}23 24; GCN-ISEL-LABEL: name:   s_usubo_pseudo25; GCN-ISEL-LABEL: body:26; GCN-ISEL: S_USUBO_PSEUDO27; GCN-ISEL: S_SUB_CO_PSEUDO28 29define amdgpu_ps i32 @s_usubo_pseudo(i32 inreg %val0, i32 inreg %val1) {30; CHECK-LABEL: s_usubo_pseudo:31; CHECK:       ; %bb.0:32; CHECK-NEXT:    s_sub_u32 s0, s0, 133; CHECK-NEXT:    s_subb_u32 s0, s1, 034; CHECK-NEXT:    ; return to shader part epilog35  %pair = call { i32, i1 } @llvm.usub.with.overflow.i32(i32 %val0, i32 1)36  %carryout = extractvalue { i32, i1 } %pair, 137  %zext_carryout = zext i1 %carryout to i3238  %result = sub i32 %val1, %zext_carryout39  ret i32 %result40}41;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:42; GCN-ISEL: {{.*}}43