86 lines · plain
1; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=armv7-apple-darwin | FileCheck %s --check-prefix=ARM2; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi | FileCheck %s --check-prefix=ARM3; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-darwin | FileCheck %s --check-prefix=THUMB4 5@a = global i8 1, align 16@b = global i16 2, align 27 8define void @t1() nounwind uwtable ssp {9; ARM: t110; ARM: ldrb11; ARM-NOT: uxtb12; ARM-NOT: and{{.*}}, #25513; THUMB: t114; THUMB: ldrb15; THUMB-NOT: uxtb16; THUMB-NOT: and{{.*}}, #25517 %1 = load i8, ptr @a, align 118 call void @foo1(i8 zeroext %1)19 ret void20}21 22define void @t2() nounwind uwtable ssp {23; ARM: t224; ARM: ldrh25; ARM-NOT: uxth26; THUMB: t227; THUMB: ldrh28; THUMB-NOT: uxth29 %1 = load i16, ptr @b, align 230 call void @foo2(i16 zeroext %1)31 ret void32}33 34declare void @foo1(i8 zeroext)35declare void @foo2(i16 zeroext)36 37define i32 @t3() nounwind uwtable ssp {38; ARM: t339; ARM: ldrb40; ARM-NOT: uxtb41; ARM-NOT: and{{.*}}, #25542; THUMB: t343; THUMB: ldrb44; THUMB-NOT: uxtb45; THUMB-NOT: and{{.*}}, #25546 %1 = load i8, ptr @a, align 147 %2 = zext i8 %1 to i3248 ret i32 %249}50 51define i32 @t4() nounwind uwtable ssp {52; ARM: t453; ARM: ldrh54; ARM-NOT: uxth55; THUMB: t456; THUMB: ldrh57; THUMB-NOT: uxth58 %1 = load i16, ptr @b, align 259 %2 = zext i16 %1 to i3260 ret i32 %261}62 63define i32 @t5() nounwind uwtable ssp {64; ARM: t565; ARM: ldrsh66; ARM-NOT: sxth67; THUMB: t568; THUMB: ldrsh69; THUMB-NOT: sxth70 %1 = load i16, ptr @b, align 271 %2 = sext i16 %1 to i3272 ret i32 %273}74 75define i32 @t6() nounwind uwtable ssp {76; ARM: t677; ARM: ldrsb78; ARM-NOT: sxtb79; THUMB: t680; THUMB: ldrsb81; THUMB-NOT: sxtb82 %1 = load i8, ptr @a, align 283 %2 = sext i8 %1 to i3284 ret i32 %285}86