1 # RUN: llc -run-pass ppc-mi-peepholes -ppc-eliminate-signext -ppc-eliminate-zeroext -verify-machineinstrs -o - %s | FileCheck %s
4 target datalayout = "E-m:e-i64:64-n32:64"
5 target triple = "powerpc64le-unknown-linux-gnu"
6 define ptr @func(ptr %a) {
15 exposesReturnsTwice: false
17 regBankSelected: false
19 tracksRegLiveness: true
21 - { reg: '$x3', virtual-reg: '%0' }
23 isFrameAddressTaken: false
24 isReturnAddressTaken: false
33 hasOpaqueSPAdjustment: false
35 hasMustTailInVarArgFunc: false
40 ; CHECK-LABEL: bb.0.entry:
41 ; CHECK: %4:g8rc = EXTSW_32_64 killed %3
42 ; CHECK: %5:g8rc = INSERT_SUBREG %15, %1, %subreg.sub_32
43 ; CHECK: %7:g8rc = EXTSW_32_64 killed %6
44 ; CHECK: %9:g8rc = INSERT_SUBREG %16, %8, %subreg.sub_32
45 ; CHECK: %11:g8rc = INSERT_SUBREG %17, %10, %subreg.sub_32
46 ; CHECK: %14:g8rc = COPY killed %13
48 %0:g8rc_nox0 = COPY $x3
49 %1:gprc, %2:g8rc_nox0 = LBZU 0, %0:g8rc_nox0
50 %3:gprc = COPY %2:g8rc_nox0
51 %4:g8rc = EXTSW_32_64 %3:gprc ; should not be eliminated
52 %5:g8rc = EXTSW_32_64 %1:gprc
54 %6:gprc = ORIS %1:gprc, 32768 ; should not be eliminated
55 %7:g8rc = EXTSW_32_64 %6:gprc
57 %8:gprc = ORIS %1:gprc, 32767
58 %9:g8rc = EXTSW_32_64 %8:gprc
60 %10:gprc = ORI %1:gprc, 32768
61 %11:g8rc = EXTSW_32_64 %10:gprc
63 %12:g8rc = IMPLICIT_DEF
64 %13:g8rc = INSERT_SUBREG %12:g8rc, %1:gprc, %subreg.sub_32
65 %14:g8rc = RLDICL %13:g8rc, 0, 32