brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · b67b86b Raw
44 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 42; These tests should not contain a sign extend.3; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | FileCheck %s4; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep extsh5; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep extsb6 7define i32 @test1(i32 %mode.0.i.0) {8; CHECK-LABEL: test1:9; CHECK:       # %bb.0:10; CHECK-NEXT:    rlwinm 3, 3, 0, 27, 2811; CHECK-NEXT:    blr12  %tmp.79 = trunc i32 %mode.0.i.0 to i1613  %tmp.80 = sext i16 %tmp.79 to i3214  %tmp.81 = and i32 %tmp.80, 2415  ret i32 %tmp.8116}17 18define signext i16 @test2(i16 signext %X, i16 signext %x)  {19; CHECK-LABEL: test2:20; CHECK:       # %bb.0:21; CHECK-NEXT:    add 3, 3, 422; CHECK-NEXT:    srawi 3, 3, 123; CHECK-NEXT:    blr24  %tmp = sext i16 %X to i3225  %tmp1 = sext i16 %x to i3226  %tmp2 = add i32 %tmp, %tmp127  %tmp4 = ashr i32 %tmp2, 128  %tmp5 = trunc i32 %tmp4 to i1629  %tmp45 = sext i16 %tmp5 to i3230  %retval = trunc i32 %tmp45 to i1631  ret i16 %retval32}33 34define signext i16 @test3(i32 zeroext %X)  {35; CHECK-LABEL: test3:36; CHECK:       # %bb.0:37; CHECK-NEXT:    srawi 3, 3, 1638; CHECK-NEXT:    blr39  %tmp1 = lshr i32 %X, 1640  %tmp2 = trunc i32 %tmp1 to i1641  ret i16 %tmp242}43 44