42 lines · plain
1; RUN: llc %s -o - -O0 -verify-machineinstrs -fast-isel=true | FileCheck %s2 3target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"4target triple = "arm64-apple-ios8.0.0"5 6; This test was trying to fold the sext %tmp142 in to the address arithmetic in %sunkaddr1.7; This was incorrect as %.mux isn't available in the last bb.8 9; CHECK: sxtw [[REG0:x[0-9]+]]10; CHECK: str [[REG0]], [sp, [[OFFSET:#[0-9]+]]]11; CHECK: ldr [[REG1:x[0-9]+]], [sp, [[OFFSET]]]12; CHECK: strh wzr, [{{.*}}, [[REG1]], lsl #1]13 14; Function Attrs: nounwind optsize ssp15define void @EdgeLoop(i32 %dir, i32 %edge, i32 %width, ptr %tmp89, i32 %tmp136, i16 %tmp144) #0 {16bb:17 %tmp2 = icmp eq i32 %dir, 018 %.mux = select i1 %tmp2, i32 %width, i32 119 %tmp142 = sext i32 %.mux to i6420 %tmp151 = shl nsw i64 %tmp142, 121 %tmp153 = getelementptr inbounds i16, ptr %tmp89, i64 %tmp15122 %tmp154 = load i16, ptr %tmp153, align 223 %tmp155 = zext i16 %tmp154 to i3224 br i1 %tmp2, label %bb225, label %bb21225 26bb212: ; preds = %bb27 store i16 %tmp144, ptr %tmp89, align 228 ret void29 30bb225: ; preds = %bb31 %tmp248 = trunc i32 %tmp155 to i1632 store i16 %tmp248, ptr %tmp89, align 233 %sunkaddr = ptrtoint ptr %tmp89 to i6434 %sunkaddr1 = mul i64 %tmp142, 235 %sunkaddr2 = add i64 %sunkaddr, %sunkaddr136 %sunkaddr3 = inttoptr i64 %sunkaddr2 to ptr37 store i16 0, ptr %sunkaddr3, align 238 ret void39}40 41attributes #0 = { nounwind optsize ssp }42