1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple aarch64--none-eabi -mcpu=cortex-a57 -verify-machineinstrs -enable-narrow-ld-merge=true | FileCheck %s --check-prefix=CHECK --check-prefix=LE 2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple aarch64_be--none-eabi -mcpu=cortex-a57 -verify-machineinstrs -enable-narrow-ld-merge=true | FileCheck %s --check-prefix=CHECK --check-prefix=BE 3*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple aarch64--none-eabi -mcpu=kryo -verify-machineinstrs -enable-narrow-ld-merge=true | FileCheck %s --check-prefix=CHECK --check-prefix=LE 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Ldrh_merge 6*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: ldrh 7*9880d681SAndroid Build Coastguard Worker; CHECK: ldr [[NEW_DEST:w[0-9]+]] 8*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: and [[LO_PART:w[0-9]+]], [[NEW_DEST]], #0xffff 9*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: lsr [[HI_PART:w[0-9]+]], [[NEW_DEST]], #16 10*9880d681SAndroid Build Coastguard Worker; LE: sub {{w[0-9]+}}, [[LO_PART]], [[HI_PART]] 11*9880d681SAndroid Build Coastguard Worker; BE: sub {{w[0-9]+}}, [[HI_PART]], [[LO_PART]] 12*9880d681SAndroid Build Coastguard Workerdefine i16 @Ldrh_merge(i16* nocapture readonly %p) { 13*9880d681SAndroid Build Coastguard Worker %1 = load i16, i16* %p, align 2 14*9880d681SAndroid Build Coastguard Worker %arrayidx2 = getelementptr inbounds i16, i16* %p, i64 1 15*9880d681SAndroid Build Coastguard Worker %2 = load i16, i16* %arrayidx2, align 2 16*9880d681SAndroid Build Coastguard Worker %add = sub nuw nsw i16 %1, %2 17*9880d681SAndroid Build Coastguard Worker ret i16 %add 18*9880d681SAndroid Build Coastguard Worker} 19*9880d681SAndroid Build Coastguard Worker 20*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Ldurh_merge 21*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: ldurh 22*9880d681SAndroid Build Coastguard Worker; CHECK: ldur [[NEW_DEST:w[0-9]+]] 23*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: and [[LO_PART:w[0-9]+]], [[NEW_DEST]], #0xffff 24*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: lsr [[HI_PART:w[0-9]+]], [[NEW_DEST]] 25*9880d681SAndroid Build Coastguard Worker; LE: sub {{w[0-9]+}}, [[LO_PART]], [[HI_PART]] 26*9880d681SAndroid Build Coastguard Worker; BE: sub {{w[0-9]+}}, [[HI_PART]], [[LO_PART]] 27*9880d681SAndroid Build Coastguard Workerdefine i16 @Ldurh_merge(i16* nocapture readonly %p) { 28*9880d681SAndroid Build Coastguard Workerentry: 29*9880d681SAndroid Build Coastguard Worker %arrayidx = getelementptr inbounds i16, i16* %p, i64 -2 30*9880d681SAndroid Build Coastguard Worker %0 = load i16, i16* %arrayidx 31*9880d681SAndroid Build Coastguard Worker %arrayidx3 = getelementptr inbounds i16, i16* %p, i64 -1 32*9880d681SAndroid Build Coastguard Worker %1 = load i16, i16* %arrayidx3 33*9880d681SAndroid Build Coastguard Worker %add = sub nuw nsw i16 %0, %1 34*9880d681SAndroid Build Coastguard Worker ret i16 %add 35*9880d681SAndroid Build Coastguard Worker} 36*9880d681SAndroid Build Coastguard Worker 37*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Ldrh_4_merge 38*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: ldrh 39*9880d681SAndroid Build Coastguard Worker; CHECK: ldp [[WORD1:w[0-9]+]], [[WORD2:w[0-9]+]], [x0] 40*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: and [[WORD1LO:w[0-9]+]], [[WORD1]], #0xffff 41*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: lsr [[WORD1HI:w[0-9]+]], [[WORD1]], #16 42*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: and [[WORD2LO:w[0-9]+]], [[WORD2]], #0xffff 43*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: lsr [[WORD2HI:w[0-9]+]], [[WORD2]], #16 44*9880d681SAndroid Build Coastguard Worker; LE-DAG: sub [[TEMP1:w[0-9]+]], [[WORD1HI]], [[WORD1LO]] 45*9880d681SAndroid Build Coastguard Worker; BE-DAG: sub [[TEMP1:w[0-9]+]], [[WORD1LO]], [[WORD1HI]] 46*9880d681SAndroid Build Coastguard Worker; LE: udiv [[TEMP2:w[0-9]+]], [[TEMP1]], [[WORD2LO]] 47*9880d681SAndroid Build Coastguard Worker; BE: udiv [[TEMP2:w[0-9]+]], [[TEMP1]], [[WORD2HI]] 48*9880d681SAndroid Build Coastguard Worker; LE: sub w0, [[TEMP2]], [[WORD2HI]] 49*9880d681SAndroid Build Coastguard Worker; BE: sub w0, [[TEMP2]], [[WORD2LO]] 50*9880d681SAndroid Build Coastguard Workerdefine i16 @Ldrh_4_merge(i16* nocapture readonly %P) { 51*9880d681SAndroid Build Coastguard Worker %arrayidx = getelementptr inbounds i16, i16* %P, i64 0 52*9880d681SAndroid Build Coastguard Worker %l0 = load i16, i16* %arrayidx 53*9880d681SAndroid Build Coastguard Worker %arrayidx2 = getelementptr inbounds i16, i16* %P, i64 1 54*9880d681SAndroid Build Coastguard Worker %l1 = load i16, i16* %arrayidx2 55*9880d681SAndroid Build Coastguard Worker %arrayidx7 = getelementptr inbounds i16, i16* %P, i64 2 56*9880d681SAndroid Build Coastguard Worker %l2 = load i16, i16* %arrayidx7 57*9880d681SAndroid Build Coastguard Worker %arrayidx12 = getelementptr inbounds i16, i16* %P, i64 3 58*9880d681SAndroid Build Coastguard Worker %l3 = load i16, i16* %arrayidx12 59*9880d681SAndroid Build Coastguard Worker %add4 = sub nuw nsw i16 %l1, %l0 60*9880d681SAndroid Build Coastguard Worker %add9 = udiv i16 %add4, %l2 61*9880d681SAndroid Build Coastguard Worker %add14 = sub nuw nsw i16 %add9, %l3 62*9880d681SAndroid Build Coastguard Worker ret i16 %add14 63*9880d681SAndroid Build Coastguard Worker} 64*9880d681SAndroid Build Coastguard Worker 65*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Ldrsh_merge 66*9880d681SAndroid Build Coastguard Worker; CHECK: ldr [[NEW_DEST:w[0-9]+]] 67*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: asr [[LO_PART:w[0-9]+]], [[NEW_DEST]], #16 68*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: sxth [[HI_PART:w[0-9]+]], [[NEW_DEST]] 69*9880d681SAndroid Build Coastguard Worker; LE: sub {{w[0-9]+}}, [[LO_PART]], [[HI_PART]] 70*9880d681SAndroid Build Coastguard Worker; BE: sub {{w[0-9]+}}, [[HI_PART]], [[LO_PART]] 71*9880d681SAndroid Build Coastguard Worker 72*9880d681SAndroid Build Coastguard Workerdefine i32 @Ldrsh_merge(i16* %p) nounwind { 73*9880d681SAndroid Build Coastguard Worker %add.ptr0 = getelementptr inbounds i16, i16* %p, i64 4 74*9880d681SAndroid Build Coastguard Worker %tmp = load i16, i16* %add.ptr0 75*9880d681SAndroid Build Coastguard Worker %add.ptr = getelementptr inbounds i16, i16* %p, i64 5 76*9880d681SAndroid Build Coastguard Worker %tmp1 = load i16, i16* %add.ptr 77*9880d681SAndroid Build Coastguard Worker %sexttmp = sext i16 %tmp to i32 78*9880d681SAndroid Build Coastguard Worker %sexttmp1 = sext i16 %tmp1 to i32 79*9880d681SAndroid Build Coastguard Worker %add = sub nsw i32 %sexttmp1, %sexttmp 80*9880d681SAndroid Build Coastguard Worker ret i32 %add 81*9880d681SAndroid Build Coastguard Worker} 82*9880d681SAndroid Build Coastguard Worker 83*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Ldrsh_zsext_merge 84*9880d681SAndroid Build Coastguard Worker; CHECK: ldr [[NEW_DEST:w[0-9]+]] 85*9880d681SAndroid Build Coastguard Worker; LE-DAG: and [[LO_PART:w[0-9]+]], [[NEW_DEST]], #0xffff 86*9880d681SAndroid Build Coastguard Worker; LE-DAG: asr [[HI_PART:w[0-9]+]], [[NEW_DEST]], #16 87*9880d681SAndroid Build Coastguard Worker; BE-DAG: sxth [[LO_PART:w[0-9]+]], [[NEW_DEST]] 88*9880d681SAndroid Build Coastguard Worker; BE-DAG: lsr [[HI_PART:w[0-9]+]], [[NEW_DEST]], #16 89*9880d681SAndroid Build Coastguard Worker; LE: sub {{w[0-9]+}}, [[LO_PART]], [[HI_PART]] 90*9880d681SAndroid Build Coastguard Worker; BE: sub {{w[0-9]+}}, [[HI_PART]], [[LO_PART]] 91*9880d681SAndroid Build Coastguard Workerdefine i32 @Ldrsh_zsext_merge(i16* %p) nounwind { 92*9880d681SAndroid Build Coastguard Worker %add.ptr0 = getelementptr inbounds i16, i16* %p, i64 4 93*9880d681SAndroid Build Coastguard Worker %tmp = load i16, i16* %add.ptr0 94*9880d681SAndroid Build Coastguard Worker %add.ptr = getelementptr inbounds i16, i16* %p, i64 5 95*9880d681SAndroid Build Coastguard Worker %tmp1 = load i16, i16* %add.ptr 96*9880d681SAndroid Build Coastguard Worker %sexttmp = zext i16 %tmp to i32 97*9880d681SAndroid Build Coastguard Worker %sexttmp1 = sext i16 %tmp1 to i32 98*9880d681SAndroid Build Coastguard Worker %add = sub nsw i32 %sexttmp, %sexttmp1 99*9880d681SAndroid Build Coastguard Worker ret i32 %add 100*9880d681SAndroid Build Coastguard Worker} 101*9880d681SAndroid Build Coastguard Worker 102*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Ldrsh_szext_merge 103*9880d681SAndroid Build Coastguard Worker; CHECK: ldr [[NEW_DEST:w[0-9]+]] 104*9880d681SAndroid Build Coastguard Worker; LE-DAG: sxth [[LO_PART:w[0-9]+]], [[NEW_DEST]] 105*9880d681SAndroid Build Coastguard Worker; LE-DAG: lsr [[HI_PART:w[0-9]+]], [[NEW_DEST]], #16 106*9880d681SAndroid Build Coastguard Worker; BE-DAG: and [[LO_PART:w[0-9]+]], [[NEW_DEST]], #0xffff 107*9880d681SAndroid Build Coastguard Worker; BE-DAG: asr [[HI_PART:w[0-9]+]], [[NEW_DEST]], #16 108*9880d681SAndroid Build Coastguard Worker; LE: sub {{w[0-9]+}}, [[LO_PART]], [[HI_PART]] 109*9880d681SAndroid Build Coastguard Worker; BE: sub {{w[0-9]+}}, [[HI_PART]], [[LO_PART]] 110*9880d681SAndroid Build Coastguard Workerdefine i32 @Ldrsh_szext_merge(i16* %p) nounwind { 111*9880d681SAndroid Build Coastguard Worker %add.ptr0 = getelementptr inbounds i16, i16* %p, i64 4 112*9880d681SAndroid Build Coastguard Worker %tmp = load i16, i16* %add.ptr0 113*9880d681SAndroid Build Coastguard Worker %add.ptr = getelementptr inbounds i16, i16* %p, i64 5 114*9880d681SAndroid Build Coastguard Worker %tmp1 = load i16, i16* %add.ptr 115*9880d681SAndroid Build Coastguard Worker %sexttmp = sext i16 %tmp to i32 116*9880d681SAndroid Build Coastguard Worker %sexttmp1 = zext i16 %tmp1 to i32 117*9880d681SAndroid Build Coastguard Worker %add = sub nsw i32 %sexttmp, %sexttmp1 118*9880d681SAndroid Build Coastguard Worker ret i32 %add 119*9880d681SAndroid Build Coastguard Worker} 120*9880d681SAndroid Build Coastguard Worker 121*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Ldrb_merge 122*9880d681SAndroid Build Coastguard Worker; CHECK: ldrh [[NEW_DEST:w[0-9]+]] 123*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: and [[LO_PART:w[0-9]+]], [[NEW_DEST]], #0xff 124*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: ubfx [[HI_PART:w[0-9]+]], [[NEW_DEST]], #8, #8 125*9880d681SAndroid Build Coastguard Worker; LE: sub {{w[0-9]+}}, [[LO_PART]], [[HI_PART]] 126*9880d681SAndroid Build Coastguard Worker; BE: sub {{w[0-9]+}}, [[HI_PART]], [[LO_PART]] 127*9880d681SAndroid Build Coastguard Workerdefine i32 @Ldrb_merge(i8* %p) nounwind { 128*9880d681SAndroid Build Coastguard Worker %add.ptr0 = getelementptr inbounds i8, i8* %p, i64 2 129*9880d681SAndroid Build Coastguard Worker %tmp = load i8, i8* %add.ptr0 130*9880d681SAndroid Build Coastguard Worker %add.ptr = getelementptr inbounds i8, i8* %p, i64 3 131*9880d681SAndroid Build Coastguard Worker %tmp1 = load i8, i8* %add.ptr 132*9880d681SAndroid Build Coastguard Worker %sexttmp = zext i8 %tmp to i32 133*9880d681SAndroid Build Coastguard Worker %sexttmp1 = zext i8 %tmp1 to i32 134*9880d681SAndroid Build Coastguard Worker %add = sub nsw i32 %sexttmp, %sexttmp1 135*9880d681SAndroid Build Coastguard Worker ret i32 %add 136*9880d681SAndroid Build Coastguard Worker} 137*9880d681SAndroid Build Coastguard Worker 138*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Ldrsb_merge 139*9880d681SAndroid Build Coastguard Worker; CHECK: ldrh [[NEW_DEST:w[0-9]+]] 140*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: sxtb [[LO_PART:w[0-9]+]], [[NEW_DEST]] 141*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: sbfx [[HI_PART:w[0-9]+]], [[NEW_DEST]], #8, #8 142*9880d681SAndroid Build Coastguard Worker; LE: sub {{w[0-9]+}}, [[LO_PART]], [[HI_PART]] 143*9880d681SAndroid Build Coastguard Worker; BE: sub {{w[0-9]+}}, [[HI_PART]], [[LO_PART]] 144*9880d681SAndroid Build Coastguard Workerdefine i32 @Ldrsb_merge(i8* %p) nounwind { 145*9880d681SAndroid Build Coastguard Worker %add.ptr0 = getelementptr inbounds i8, i8* %p, i64 2 146*9880d681SAndroid Build Coastguard Worker %tmp = load i8, i8* %add.ptr0 147*9880d681SAndroid Build Coastguard Worker %add.ptr = getelementptr inbounds i8, i8* %p, i64 3 148*9880d681SAndroid Build Coastguard Worker %tmp1 = load i8, i8* %add.ptr 149*9880d681SAndroid Build Coastguard Worker %sexttmp = sext i8 %tmp to i32 150*9880d681SAndroid Build Coastguard Worker %sexttmp1 = sext i8 %tmp1 to i32 151*9880d681SAndroid Build Coastguard Worker %add = sub nsw i32 %sexttmp, %sexttmp1 152*9880d681SAndroid Build Coastguard Worker ret i32 %add 153*9880d681SAndroid Build Coastguard Worker} 154*9880d681SAndroid Build Coastguard Worker 155*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Ldrsb_zsext_merge 156*9880d681SAndroid Build Coastguard Worker; CHECK: ldrh [[NEW_DEST:w[0-9]+]] 157*9880d681SAndroid Build Coastguard Worker; LE-DAG: and [[LO_PART:w[0-9]+]], [[NEW_DEST]], #0xff 158*9880d681SAndroid Build Coastguard Worker; LE-DAG: sbfx [[HI_PART:w[0-9]+]], [[NEW_DEST]], #8, #8 159*9880d681SAndroid Build Coastguard Worker; BE-DAG: sxtb [[LO_PART:w[0-9]+]], [[NEW_DEST]] 160*9880d681SAndroid Build Coastguard Worker; BE-DAG: ubfx [[HI_PART:w[0-9]+]], [[NEW_DEST]], #8, #8 161*9880d681SAndroid Build Coastguard Worker; LE: sub {{w[0-9]+}}, [[LO_PART]], [[HI_PART]] 162*9880d681SAndroid Build Coastguard Worker; BE: sub {{w[0-9]+}}, [[HI_PART]], [[LO_PART]] 163*9880d681SAndroid Build Coastguard Workerdefine i32 @Ldrsb_zsext_merge(i8* %p) nounwind { 164*9880d681SAndroid Build Coastguard Worker %add.ptr0 = getelementptr inbounds i8, i8* %p, i64 2 165*9880d681SAndroid Build Coastguard Worker %tmp = load i8, i8* %add.ptr0 166*9880d681SAndroid Build Coastguard Worker %add.ptr = getelementptr inbounds i8, i8* %p, i64 3 167*9880d681SAndroid Build Coastguard Worker %tmp1 = load i8, i8* %add.ptr 168*9880d681SAndroid Build Coastguard Worker %sexttmp = zext i8 %tmp to i32 169*9880d681SAndroid Build Coastguard Worker %sexttmp1 = sext i8 %tmp1 to i32 170*9880d681SAndroid Build Coastguard Worker %add = sub nsw i32 %sexttmp, %sexttmp1 171*9880d681SAndroid Build Coastguard Worker ret i32 %add 172*9880d681SAndroid Build Coastguard Worker} 173*9880d681SAndroid Build Coastguard Worker 174*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Ldrsb_szext_merge 175*9880d681SAndroid Build Coastguard Worker; CHECK: ldrh [[NEW_DEST:w[0-9]+]] 176*9880d681SAndroid Build Coastguard Worker; LE-DAG: sxtb [[LO_PART:w[0-9]+]], [[NEW_DEST]] 177*9880d681SAndroid Build Coastguard Worker; LE-DAG: ubfx [[HI_PART:w[0-9]+]], [[NEW_DEST]], #8, #8 178*9880d681SAndroid Build Coastguard Worker; BE-DAG: and [[LO_PART:w[0-9]+]], [[NEW_DEST]], #0xff 179*9880d681SAndroid Build Coastguard Worker; BE-DAG: sbfx [[HI_PART:w[0-9]+]], [[NEW_DEST]], #8, #8 180*9880d681SAndroid Build Coastguard Worker; LE: sub {{w[0-9]+}}, [[LO_PART]], [[HI_PART]] 181*9880d681SAndroid Build Coastguard Worker; BE: sub {{w[0-9]+}}, [[HI_PART]], [[LO_PART]] 182*9880d681SAndroid Build Coastguard Workerdefine i32 @Ldrsb_szext_merge(i8* %p) nounwind { 183*9880d681SAndroid Build Coastguard Worker %add.ptr0 = getelementptr inbounds i8, i8* %p, i64 2 184*9880d681SAndroid Build Coastguard Worker %tmp = load i8, i8* %add.ptr0 185*9880d681SAndroid Build Coastguard Worker %add.ptr = getelementptr inbounds i8, i8* %p, i64 3 186*9880d681SAndroid Build Coastguard Worker %tmp1 = load i8, i8* %add.ptr 187*9880d681SAndroid Build Coastguard Worker %sexttmp = sext i8 %tmp to i32 188*9880d681SAndroid Build Coastguard Worker %sexttmp1 = zext i8 %tmp1 to i32 189*9880d681SAndroid Build Coastguard Worker %add = sub nsw i32 %sexttmp, %sexttmp1 190*9880d681SAndroid Build Coastguard Worker ret i32 %add 191*9880d681SAndroid Build Coastguard Worker} 192*9880d681SAndroid Build Coastguard Worker 193*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Ldursh_merge 194*9880d681SAndroid Build Coastguard Worker; CHECK: ldur [[NEW_DEST:w[0-9]+]] 195*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: asr [[LO_PART:w[0-9]+]], [[NEW_DEST]], #16 196*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: sxth [[HI_PART:w[0-9]+]], [[NEW_DEST]] 197*9880d681SAndroid Build Coastguard Worker; LE: sub {{w[0-9]+}}, [[LO_PART]], [[HI_PART]] 198*9880d681SAndroid Build Coastguard Worker; BE: sub {{w[0-9]+}}, [[HI_PART]], [[LO_PART]] 199*9880d681SAndroid Build Coastguard Workerdefine i32 @Ldursh_merge(i16* %p) nounwind { 200*9880d681SAndroid Build Coastguard Worker %add.ptr0 = getelementptr inbounds i16, i16* %p, i64 -1 201*9880d681SAndroid Build Coastguard Worker %tmp = load i16, i16* %add.ptr0 202*9880d681SAndroid Build Coastguard Worker %add.ptr = getelementptr inbounds i16, i16* %p, i64 -2 203*9880d681SAndroid Build Coastguard Worker %tmp1 = load i16, i16* %add.ptr 204*9880d681SAndroid Build Coastguard Worker %sexttmp = sext i16 %tmp to i32 205*9880d681SAndroid Build Coastguard Worker %sexttmp1 = sext i16 %tmp1 to i32 206*9880d681SAndroid Build Coastguard Worker %add = sub nsw i32 %sexttmp, %sexttmp1 207*9880d681SAndroid Build Coastguard Worker ret i32 %add 208*9880d681SAndroid Build Coastguard Worker} 209*9880d681SAndroid Build Coastguard Worker 210*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Ldursh_zsext_merge 211*9880d681SAndroid Build Coastguard Worker; CHECK: ldur [[NEW_DEST:w[0-9]+]] 212*9880d681SAndroid Build Coastguard Worker; LE-DAG: lsr [[LO_PART:w[0-9]+]], [[NEW_DEST]], #16 213*9880d681SAndroid Build Coastguard Worker; LE-DAG: sxth [[HI_PART:w[0-9]+]], [[NEW_DEST]] 214*9880d681SAndroid Build Coastguard Worker; BE-DAG: asr [[LO_PART:w[0-9]+]], [[NEW_DEST]], #16 215*9880d681SAndroid Build Coastguard Worker; BE-DAG: and [[HI_PART:w[0-9]+]], [[NEW_DEST]], #0xffff 216*9880d681SAndroid Build Coastguard Worker; LE: sub {{w[0-9]+}}, [[LO_PART]], [[HI_PART]] 217*9880d681SAndroid Build Coastguard Worker; BE: sub {{w[0-9]+}}, [[HI_PART]], [[LO_PART]] 218*9880d681SAndroid Build Coastguard Workerdefine i32 @Ldursh_zsext_merge(i16* %p) nounwind { 219*9880d681SAndroid Build Coastguard Worker %add.ptr0 = getelementptr inbounds i16, i16* %p, i64 -1 220*9880d681SAndroid Build Coastguard Worker %tmp = load i16, i16* %add.ptr0 221*9880d681SAndroid Build Coastguard Worker %add.ptr = getelementptr inbounds i16, i16* %p, i64 -2 222*9880d681SAndroid Build Coastguard Worker %tmp1 = load i16, i16* %add.ptr 223*9880d681SAndroid Build Coastguard Worker %sexttmp = zext i16 %tmp to i32 224*9880d681SAndroid Build Coastguard Worker %sexttmp1 = sext i16 %tmp1 to i32 225*9880d681SAndroid Build Coastguard Worker %add = sub nsw i32 %sexttmp, %sexttmp1 226*9880d681SAndroid Build Coastguard Worker ret i32 %add 227*9880d681SAndroid Build Coastguard Worker} 228*9880d681SAndroid Build Coastguard Worker 229*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Ldursh_szext_merge 230*9880d681SAndroid Build Coastguard Worker; CHECK: ldur [[NEW_DEST:w[0-9]+]] 231*9880d681SAndroid Build Coastguard Worker; LE-DAG: asr [[LO_PART:w[0-9]+]], [[NEW_DEST]], #16 232*9880d681SAndroid Build Coastguard Worker; LE-DAG: and [[HI_PART:w[0-9]+]], [[NEW_DEST]], #0xffff 233*9880d681SAndroid Build Coastguard Worker; BE-DAG: lsr [[LO_PART:w[0-9]+]], [[NEW_DEST]], #16 234*9880d681SAndroid Build Coastguard Worker; BE-DAG: sxth [[HI_PART:w[0-9]+]], [[NEW_DEST]] 235*9880d681SAndroid Build Coastguard Worker; LE: sub {{w[0-9]+}}, [[LO_PART]], [[HI_PART]] 236*9880d681SAndroid Build Coastguard Worker; BE: sub {{w[0-9]+}}, [[HI_PART]], [[LO_PART]] 237*9880d681SAndroid Build Coastguard Workerdefine i32 @Ldursh_szext_merge(i16* %p) nounwind { 238*9880d681SAndroid Build Coastguard Worker %add.ptr0 = getelementptr inbounds i16, i16* %p, i64 -1 239*9880d681SAndroid Build Coastguard Worker %tmp = load i16, i16* %add.ptr0 240*9880d681SAndroid Build Coastguard Worker %add.ptr = getelementptr inbounds i16, i16* %p, i64 -2 241*9880d681SAndroid Build Coastguard Worker %tmp1 = load i16, i16* %add.ptr 242*9880d681SAndroid Build Coastguard Worker %sexttmp = sext i16 %tmp to i32 243*9880d681SAndroid Build Coastguard Worker %sexttmp1 = zext i16 %tmp1 to i32 244*9880d681SAndroid Build Coastguard Worker %add = sub nsw i32 %sexttmp, %sexttmp1 245*9880d681SAndroid Build Coastguard Worker ret i32 %add 246*9880d681SAndroid Build Coastguard Worker} 247*9880d681SAndroid Build Coastguard Worker 248*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Ldurb_merge 249*9880d681SAndroid Build Coastguard Worker; CHECK: ldurh [[NEW_DEST:w[0-9]+]] 250*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: ubfx [[LO_PART:w[0-9]+]], [[NEW_DEST]], #8, #8 251*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: and [[HI_PART:w[0-9]+]], [[NEW_DEST]], #0xff 252*9880d681SAndroid Build Coastguard Worker; LE: sub {{w[0-9]+}}, [[LO_PART]], [[HI_PART]] 253*9880d681SAndroid Build Coastguard Worker; BE: sub {{w[0-9]+}}, [[HI_PART]], [[LO_PART]] 254*9880d681SAndroid Build Coastguard Workerdefine i32 @Ldurb_merge(i8* %p) nounwind { 255*9880d681SAndroid Build Coastguard Worker %add.ptr0 = getelementptr inbounds i8, i8* %p, i64 -1 256*9880d681SAndroid Build Coastguard Worker %tmp = load i8, i8* %add.ptr0 257*9880d681SAndroid Build Coastguard Worker %add.ptr = getelementptr inbounds i8, i8* %p, i64 -2 258*9880d681SAndroid Build Coastguard Worker %tmp1 = load i8, i8* %add.ptr 259*9880d681SAndroid Build Coastguard Worker %sexttmp = zext i8 %tmp to i32 260*9880d681SAndroid Build Coastguard Worker %sexttmp1 = zext i8 %tmp1 to i32 261*9880d681SAndroid Build Coastguard Worker %add = sub nsw i32 %sexttmp, %sexttmp1 262*9880d681SAndroid Build Coastguard Worker ret i32 %add 263*9880d681SAndroid Build Coastguard Worker} 264*9880d681SAndroid Build Coastguard Worker 265*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Ldursb_merge 266*9880d681SAndroid Build Coastguard Worker; CHECK: ldurh [[NEW_DEST:w[0-9]+]] 267*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: sbfx [[LO_PART:w[0-9]+]], [[NEW_DEST]], #8, #8 268*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: sxtb [[HI_PART:w[0-9]+]], [[NEW_DEST]] 269*9880d681SAndroid Build Coastguard Worker; LE: sub {{w[0-9]+}}, [[LO_PART]], [[HI_PART]] 270*9880d681SAndroid Build Coastguard Worker; BE: sub {{w[0-9]+}}, [[HI_PART]], [[LO_PART]] 271*9880d681SAndroid Build Coastguard Workerdefine i32 @Ldursb_merge(i8* %p) nounwind { 272*9880d681SAndroid Build Coastguard Worker %add.ptr0 = getelementptr inbounds i8, i8* %p, i64 -1 273*9880d681SAndroid Build Coastguard Worker %tmp = load i8, i8* %add.ptr0 274*9880d681SAndroid Build Coastguard Worker %add.ptr = getelementptr inbounds i8, i8* %p, i64 -2 275*9880d681SAndroid Build Coastguard Worker %tmp1 = load i8, i8* %add.ptr 276*9880d681SAndroid Build Coastguard Worker %sexttmp = sext i8 %tmp to i32 277*9880d681SAndroid Build Coastguard Worker %sexttmp1 = sext i8 %tmp1 to i32 278*9880d681SAndroid Build Coastguard Worker %add = sub nsw i32 %sexttmp, %sexttmp1 279*9880d681SAndroid Build Coastguard Worker ret i32 %add 280*9880d681SAndroid Build Coastguard Worker} 281*9880d681SAndroid Build Coastguard Worker 282*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Ldursb_zsext_merge 283*9880d681SAndroid Build Coastguard Worker; CHECK: ldurh [[NEW_DEST:w[0-9]+]] 284*9880d681SAndroid Build Coastguard Worker; LE-DAG: ubfx [[LO_PART:w[0-9]+]], [[NEW_DEST]], #8, #8 285*9880d681SAndroid Build Coastguard Worker; LE-DAG: sxtb [[HI_PART:w[0-9]+]], [[NEW_DEST]] 286*9880d681SAndroid Build Coastguard Worker; BE-DAG: sbfx [[LO_PART:w[0-9]+]], [[NEW_DEST]], #8, #8 287*9880d681SAndroid Build Coastguard Worker; BE-DAG: and [[HI_PART:w[0-9]+]], [[NEW_DEST]], #0xff 288*9880d681SAndroid Build Coastguard Worker; LE: sub {{w[0-9]+}}, [[LO_PART]], [[HI_PART]] 289*9880d681SAndroid Build Coastguard Worker; BE: sub {{w[0-9]+}}, [[HI_PART]], [[LO_PART]] 290*9880d681SAndroid Build Coastguard Workerdefine i32 @Ldursb_zsext_merge(i8* %p) nounwind { 291*9880d681SAndroid Build Coastguard Worker %add.ptr0 = getelementptr inbounds i8, i8* %p, i64 -1 292*9880d681SAndroid Build Coastguard Worker %tmp = load i8, i8* %add.ptr0 293*9880d681SAndroid Build Coastguard Worker %add.ptr = getelementptr inbounds i8, i8* %p, i64 -2 294*9880d681SAndroid Build Coastguard Worker %tmp1 = load i8, i8* %add.ptr 295*9880d681SAndroid Build Coastguard Worker %sexttmp = zext i8 %tmp to i32 296*9880d681SAndroid Build Coastguard Worker %sexttmp1 = sext i8 %tmp1 to i32 297*9880d681SAndroid Build Coastguard Worker %add = sub nsw i32 %sexttmp, %sexttmp1 298*9880d681SAndroid Build Coastguard Worker ret i32 %add 299*9880d681SAndroid Build Coastguard Worker} 300*9880d681SAndroid Build Coastguard Worker 301*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Ldursb_szext_merge 302*9880d681SAndroid Build Coastguard Worker; CHECK: ldurh [[NEW_DEST:w[0-9]+]] 303*9880d681SAndroid Build Coastguard Worker; LE-DAG: sbfx [[LO_PART:w[0-9]+]], [[NEW_DEST]], #8, #8 304*9880d681SAndroid Build Coastguard Worker; LE-DAG: and [[HI_PART:w[0-9]+]], [[NEW_DEST]], #0xff 305*9880d681SAndroid Build Coastguard Worker; BE-DAG: ubfx [[LO_PART:w[0-9]+]], [[NEW_DEST]], #8, #8 306*9880d681SAndroid Build Coastguard Worker; BE-DAG: sxtb [[HI_PART:w[0-9]+]], [[NEW_DEST]] 307*9880d681SAndroid Build Coastguard Worker; LE: sub {{w[0-9]+}}, [[LO_PART]], [[HI_PART]] 308*9880d681SAndroid Build Coastguard Worker; BE: sub {{w[0-9]+}}, [[HI_PART]], [[LO_PART]] 309*9880d681SAndroid Build Coastguard Workerdefine i32 @Ldursb_szext_merge(i8* %p) nounwind { 310*9880d681SAndroid Build Coastguard Worker %add.ptr0 = getelementptr inbounds i8, i8* %p, i64 -1 311*9880d681SAndroid Build Coastguard Worker %tmp = load i8, i8* %add.ptr0 312*9880d681SAndroid Build Coastguard Worker %add.ptr = getelementptr inbounds i8, i8* %p, i64 -2 313*9880d681SAndroid Build Coastguard Worker %tmp1 = load i8, i8* %add.ptr 314*9880d681SAndroid Build Coastguard Worker %sexttmp = sext i8 %tmp to i32 315*9880d681SAndroid Build Coastguard Worker %sexttmp1 = zext i8 %tmp1 to i32 316*9880d681SAndroid Build Coastguard Worker %add = sub nsw i32 %sexttmp, %sexttmp1 317*9880d681SAndroid Build Coastguard Worker ret i32 %add 318*9880d681SAndroid Build Coastguard Worker} 319*9880d681SAndroid Build Coastguard Worker 320*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Strh_zero 321*9880d681SAndroid Build Coastguard Worker; CHECK: str wzr 322*9880d681SAndroid Build Coastguard Workerdefine void @Strh_zero(i16* nocapture %P, i32 %n) { 323*9880d681SAndroid Build Coastguard Workerentry: 324*9880d681SAndroid Build Coastguard Worker %idxprom = sext i32 %n to i64 325*9880d681SAndroid Build Coastguard Worker %arrayidx = getelementptr inbounds i16, i16* %P, i64 %idxprom 326*9880d681SAndroid Build Coastguard Worker store i16 0, i16* %arrayidx 327*9880d681SAndroid Build Coastguard Worker %add = add nsw i32 %n, 1 328*9880d681SAndroid Build Coastguard Worker %idxprom1 = sext i32 %add to i64 329*9880d681SAndroid Build Coastguard Worker %arrayidx2 = getelementptr inbounds i16, i16* %P, i64 %idxprom1 330*9880d681SAndroid Build Coastguard Worker store i16 0, i16* %arrayidx2 331*9880d681SAndroid Build Coastguard Worker ret void 332*9880d681SAndroid Build Coastguard Worker} 333*9880d681SAndroid Build Coastguard Worker 334*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Strh_zero_4 335*9880d681SAndroid Build Coastguard Worker; CHECK: stp wzr, wzr 336*9880d681SAndroid Build Coastguard Workerdefine void @Strh_zero_4(i16* nocapture %P, i32 %n) { 337*9880d681SAndroid Build Coastguard Workerentry: 338*9880d681SAndroid Build Coastguard Worker %idxprom = sext i32 %n to i64 339*9880d681SAndroid Build Coastguard Worker %arrayidx = getelementptr inbounds i16, i16* %P, i64 %idxprom 340*9880d681SAndroid Build Coastguard Worker store i16 0, i16* %arrayidx 341*9880d681SAndroid Build Coastguard Worker %add = add nsw i32 %n, 1 342*9880d681SAndroid Build Coastguard Worker %idxprom1 = sext i32 %add to i64 343*9880d681SAndroid Build Coastguard Worker %arrayidx2 = getelementptr inbounds i16, i16* %P, i64 %idxprom1 344*9880d681SAndroid Build Coastguard Worker store i16 0, i16* %arrayidx2 345*9880d681SAndroid Build Coastguard Worker %add3 = add nsw i32 %n, 2 346*9880d681SAndroid Build Coastguard Worker %idxprom4 = sext i32 %add3 to i64 347*9880d681SAndroid Build Coastguard Worker %arrayidx5 = getelementptr inbounds i16, i16* %P, i64 %idxprom4 348*9880d681SAndroid Build Coastguard Worker store i16 0, i16* %arrayidx5 349*9880d681SAndroid Build Coastguard Worker %add6 = add nsw i32 %n, 3 350*9880d681SAndroid Build Coastguard Worker %idxprom7 = sext i32 %add6 to i64 351*9880d681SAndroid Build Coastguard Worker %arrayidx8 = getelementptr inbounds i16, i16* %P, i64 %idxprom7 352*9880d681SAndroid Build Coastguard Worker store i16 0, i16* %arrayidx8 353*9880d681SAndroid Build Coastguard Worker ret void 354*9880d681SAndroid Build Coastguard Worker} 355*9880d681SAndroid Build Coastguard Worker 356*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Strw_zero 357*9880d681SAndroid Build Coastguard Worker; CHECK: str xzr 358*9880d681SAndroid Build Coastguard Workerdefine void @Strw_zero(i32* nocapture %P, i32 %n) { 359*9880d681SAndroid Build Coastguard Workerentry: 360*9880d681SAndroid Build Coastguard Worker %idxprom = sext i32 %n to i64 361*9880d681SAndroid Build Coastguard Worker %arrayidx = getelementptr inbounds i32, i32* %P, i64 %idxprom 362*9880d681SAndroid Build Coastguard Worker store i32 0, i32* %arrayidx 363*9880d681SAndroid Build Coastguard Worker %add = add nsw i32 %n, 1 364*9880d681SAndroid Build Coastguard Worker %idxprom1 = sext i32 %add to i64 365*9880d681SAndroid Build Coastguard Worker %arrayidx2 = getelementptr inbounds i32, i32* %P, i64 %idxprom1 366*9880d681SAndroid Build Coastguard Worker store i32 0, i32* %arrayidx2 367*9880d681SAndroid Build Coastguard Worker ret void 368*9880d681SAndroid Build Coastguard Worker} 369*9880d681SAndroid Build Coastguard Worker 370*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Strw_zero_nonzero 371*9880d681SAndroid Build Coastguard Worker; CHECK: stp wzr, w1 372*9880d681SAndroid Build Coastguard Workerdefine void @Strw_zero_nonzero(i32* nocapture %P, i32 %n) { 373*9880d681SAndroid Build Coastguard Workerentry: 374*9880d681SAndroid Build Coastguard Worker %idxprom = sext i32 %n to i64 375*9880d681SAndroid Build Coastguard Worker %arrayidx = getelementptr inbounds i32, i32* %P, i64 %idxprom 376*9880d681SAndroid Build Coastguard Worker store i32 0, i32* %arrayidx 377*9880d681SAndroid Build Coastguard Worker %add = add nsw i32 %n, 1 378*9880d681SAndroid Build Coastguard Worker %idxprom1 = sext i32 %add to i64 379*9880d681SAndroid Build Coastguard Worker %arrayidx2 = getelementptr inbounds i32, i32* %P, i64 %idxprom1 380*9880d681SAndroid Build Coastguard Worker store i32 %n, i32* %arrayidx2 381*9880d681SAndroid Build Coastguard Worker ret void 382*9880d681SAndroid Build Coastguard Worker} 383*9880d681SAndroid Build Coastguard Worker 384*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Strw_zero_4 385*9880d681SAndroid Build Coastguard Worker; CHECK: stp xzr 386*9880d681SAndroid Build Coastguard Workerdefine void @Strw_zero_4(i32* nocapture %P, i32 %n) { 387*9880d681SAndroid Build Coastguard Workerentry: 388*9880d681SAndroid Build Coastguard Worker %idxprom = sext i32 %n to i64 389*9880d681SAndroid Build Coastguard Worker %arrayidx = getelementptr inbounds i32, i32* %P, i64 %idxprom 390*9880d681SAndroid Build Coastguard Worker store i32 0, i32* %arrayidx 391*9880d681SAndroid Build Coastguard Worker %add = add nsw i32 %n, 1 392*9880d681SAndroid Build Coastguard Worker %idxprom1 = sext i32 %add to i64 393*9880d681SAndroid Build Coastguard Worker %arrayidx2 = getelementptr inbounds i32, i32* %P, i64 %idxprom1 394*9880d681SAndroid Build Coastguard Worker store i32 0, i32* %arrayidx2 395*9880d681SAndroid Build Coastguard Worker %add3 = add nsw i32 %n, 2 396*9880d681SAndroid Build Coastguard Worker %idxprom4 = sext i32 %add3 to i64 397*9880d681SAndroid Build Coastguard Worker %arrayidx5 = getelementptr inbounds i32, i32* %P, i64 %idxprom4 398*9880d681SAndroid Build Coastguard Worker store i32 0, i32* %arrayidx5 399*9880d681SAndroid Build Coastguard Worker %add6 = add nsw i32 %n, 3 400*9880d681SAndroid Build Coastguard Worker %idxprom7 = sext i32 %add6 to i64 401*9880d681SAndroid Build Coastguard Worker %arrayidx8 = getelementptr inbounds i32, i32* %P, i64 %idxprom7 402*9880d681SAndroid Build Coastguard Worker store i32 0, i32* %arrayidx8 403*9880d681SAndroid Build Coastguard Worker ret void 404*9880d681SAndroid Build Coastguard Worker} 405*9880d681SAndroid Build Coastguard Worker 406*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Sturb_zero 407*9880d681SAndroid Build Coastguard Worker; CHECK: sturh wzr 408*9880d681SAndroid Build Coastguard Workerdefine void @Sturb_zero(i8* nocapture %P, i32 %n) #0 { 409*9880d681SAndroid Build Coastguard Workerentry: 410*9880d681SAndroid Build Coastguard Worker %sub = add nsw i32 %n, -2 411*9880d681SAndroid Build Coastguard Worker %idxprom = sext i32 %sub to i64 412*9880d681SAndroid Build Coastguard Worker %arrayidx = getelementptr inbounds i8, i8* %P, i64 %idxprom 413*9880d681SAndroid Build Coastguard Worker store i8 0, i8* %arrayidx 414*9880d681SAndroid Build Coastguard Worker %sub2= add nsw i32 %n, -1 415*9880d681SAndroid Build Coastguard Worker %idxprom1 = sext i32 %sub2 to i64 416*9880d681SAndroid Build Coastguard Worker %arrayidx2 = getelementptr inbounds i8, i8* %P, i64 %idxprom1 417*9880d681SAndroid Build Coastguard Worker store i8 0, i8* %arrayidx2 418*9880d681SAndroid Build Coastguard Worker ret void 419*9880d681SAndroid Build Coastguard Worker} 420*9880d681SAndroid Build Coastguard Worker 421*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Sturh_zero 422*9880d681SAndroid Build Coastguard Worker; CHECK: stur wzr 423*9880d681SAndroid Build Coastguard Workerdefine void @Sturh_zero(i16* nocapture %P, i32 %n) { 424*9880d681SAndroid Build Coastguard Workerentry: 425*9880d681SAndroid Build Coastguard Worker %sub = add nsw i32 %n, -2 426*9880d681SAndroid Build Coastguard Worker %idxprom = sext i32 %sub to i64 427*9880d681SAndroid Build Coastguard Worker %arrayidx = getelementptr inbounds i16, i16* %P, i64 %idxprom 428*9880d681SAndroid Build Coastguard Worker store i16 0, i16* %arrayidx 429*9880d681SAndroid Build Coastguard Worker %sub1 = add nsw i32 %n, -3 430*9880d681SAndroid Build Coastguard Worker %idxprom2 = sext i32 %sub1 to i64 431*9880d681SAndroid Build Coastguard Worker %arrayidx3 = getelementptr inbounds i16, i16* %P, i64 %idxprom2 432*9880d681SAndroid Build Coastguard Worker store i16 0, i16* %arrayidx3 433*9880d681SAndroid Build Coastguard Worker ret void 434*9880d681SAndroid Build Coastguard Worker} 435*9880d681SAndroid Build Coastguard Worker 436*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Sturh_zero_4 437*9880d681SAndroid Build Coastguard Worker; CHECK: stp wzr, wzr 438*9880d681SAndroid Build Coastguard Workerdefine void @Sturh_zero_4(i16* nocapture %P, i32 %n) { 439*9880d681SAndroid Build Coastguard Workerentry: 440*9880d681SAndroid Build Coastguard Worker %sub = add nsw i32 %n, -3 441*9880d681SAndroid Build Coastguard Worker %idxprom = sext i32 %sub to i64 442*9880d681SAndroid Build Coastguard Worker %arrayidx = getelementptr inbounds i16, i16* %P, i64 %idxprom 443*9880d681SAndroid Build Coastguard Worker store i16 0, i16* %arrayidx 444*9880d681SAndroid Build Coastguard Worker %sub1 = add nsw i32 %n, -4 445*9880d681SAndroid Build Coastguard Worker %idxprom2 = sext i32 %sub1 to i64 446*9880d681SAndroid Build Coastguard Worker %arrayidx3 = getelementptr inbounds i16, i16* %P, i64 %idxprom2 447*9880d681SAndroid Build Coastguard Worker store i16 0, i16* %arrayidx3 448*9880d681SAndroid Build Coastguard Worker %sub4 = add nsw i32 %n, -2 449*9880d681SAndroid Build Coastguard Worker %idxprom5 = sext i32 %sub4 to i64 450*9880d681SAndroid Build Coastguard Worker %arrayidx6 = getelementptr inbounds i16, i16* %P, i64 %idxprom5 451*9880d681SAndroid Build Coastguard Worker store i16 0, i16* %arrayidx6 452*9880d681SAndroid Build Coastguard Worker %sub7 = add nsw i32 %n, -1 453*9880d681SAndroid Build Coastguard Worker %idxprom8 = sext i32 %sub7 to i64 454*9880d681SAndroid Build Coastguard Worker %arrayidx9 = getelementptr inbounds i16, i16* %P, i64 %idxprom8 455*9880d681SAndroid Build Coastguard Worker store i16 0, i16* %arrayidx9 456*9880d681SAndroid Build Coastguard Worker ret void 457*9880d681SAndroid Build Coastguard Worker} 458*9880d681SAndroid Build Coastguard Worker 459*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Sturw_zero 460*9880d681SAndroid Build Coastguard Worker; CHECK: stur xzr 461*9880d681SAndroid Build Coastguard Workerdefine void @Sturw_zero(i32* nocapture %P, i32 %n) { 462*9880d681SAndroid Build Coastguard Workerentry: 463*9880d681SAndroid Build Coastguard Worker %sub = add nsw i32 %n, -3 464*9880d681SAndroid Build Coastguard Worker %idxprom = sext i32 %sub to i64 465*9880d681SAndroid Build Coastguard Worker %arrayidx = getelementptr inbounds i32, i32* %P, i64 %idxprom 466*9880d681SAndroid Build Coastguard Worker store i32 0, i32* %arrayidx 467*9880d681SAndroid Build Coastguard Worker %sub1 = add nsw i32 %n, -4 468*9880d681SAndroid Build Coastguard Worker %idxprom2 = sext i32 %sub1 to i64 469*9880d681SAndroid Build Coastguard Worker %arrayidx3 = getelementptr inbounds i32, i32* %P, i64 %idxprom2 470*9880d681SAndroid Build Coastguard Worker store i32 0, i32* %arrayidx3 471*9880d681SAndroid Build Coastguard Worker ret void 472*9880d681SAndroid Build Coastguard Worker} 473*9880d681SAndroid Build Coastguard Worker 474*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: Sturw_zero_4 475*9880d681SAndroid Build Coastguard Worker; CHECK: stp xzr, xzr 476*9880d681SAndroid Build Coastguard Workerdefine void @Sturw_zero_4(i32* nocapture %P, i32 %n) { 477*9880d681SAndroid Build Coastguard Workerentry: 478*9880d681SAndroid Build Coastguard Worker %sub = add nsw i32 %n, -3 479*9880d681SAndroid Build Coastguard Worker %idxprom = sext i32 %sub to i64 480*9880d681SAndroid Build Coastguard Worker %arrayidx = getelementptr inbounds i32, i32* %P, i64 %idxprom 481*9880d681SAndroid Build Coastguard Worker store i32 0, i32* %arrayidx 482*9880d681SAndroid Build Coastguard Worker %sub1 = add nsw i32 %n, -4 483*9880d681SAndroid Build Coastguard Worker %idxprom2 = sext i32 %sub1 to i64 484*9880d681SAndroid Build Coastguard Worker %arrayidx3 = getelementptr inbounds i32, i32* %P, i64 %idxprom2 485*9880d681SAndroid Build Coastguard Worker store i32 0, i32* %arrayidx3 486*9880d681SAndroid Build Coastguard Worker %sub4 = add nsw i32 %n, -2 487*9880d681SAndroid Build Coastguard Worker %idxprom5 = sext i32 %sub4 to i64 488*9880d681SAndroid Build Coastguard Worker %arrayidx6 = getelementptr inbounds i32, i32* %P, i64 %idxprom5 489*9880d681SAndroid Build Coastguard Worker store i32 0, i32* %arrayidx6 490*9880d681SAndroid Build Coastguard Worker %sub7 = add nsw i32 %n, -1 491*9880d681SAndroid Build Coastguard Worker %idxprom8 = sext i32 %sub7 to i64 492*9880d681SAndroid Build Coastguard Worker %arrayidx9 = getelementptr inbounds i32, i32* %P, i64 %idxprom8 493*9880d681SAndroid Build Coastguard Worker store i32 0, i32* %arrayidx9 494*9880d681SAndroid Build Coastguard Worker ret void 495*9880d681SAndroid Build Coastguard Worker} 496*9880d681SAndroid Build Coastguard Worker 497