26 lines · plain
1; RUN: llc -mtriple=arm64-apple-ios -o - %s -fast-isel=1 -O0 | FileCheck %s2 3; The zext can be folded into the load and removed, but doing so can invalidate4; pointers internal to FastISel and cause a crash so it must be done carefully.5define i32 @test() {6; CHECK-LABEL: test:7; CHECK: ldrh8; CHECK: bl _callee9; CHECK-NOT: uxth10 11entry:12 store i32 undef, ptr undef, align 413 %t81 = load i16, ptr undef, align 214 call void @callee()15 %t82 = zext i16 %t81 to i3216 %t83 = shl i32 %t82, 1617 %t84 = or i32 undef, %t8318 br label %end19 20end:21 %val = phi i32 [%t84, %entry]22 ret i32 %val23}24 25declare void @callee()26