1 ; RUN: llc %s -o - -fast-isel=true -O1 -verify-machineinstrs | FileCheck %s
3 target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
4 target triple = "arm64-apple-ios8.0.0"
6 ; The machine verifier was asserting on this test because the AND instruction was
7 ; sunk below the test which killed %tmp340.
8 ; The kill flags on the test had to be cleared because the AND was going to read
9 ; registers in a BB after the test instruction.
14 define i32 @test(i32* %ptr) {
18 .thread: ; preds = %.thread, %bb
19 %loc = phi i32 [ %next_iter, %.thread ], [ 0, %bb ]
20 %next_iter = lshr i32 %loc, 1
21 %tmp340 = sub i32 %loc, 1
22 %tmp341 = and i32 %tmp340, 1
23 %tmp342 = icmp eq i32 %tmp341, 0
24 br i1 %tmp342, label %bb343, label %.thread
26 bb343: ; preds = %.thread
27 store i32 %tmp341, i32* %ptr, align 4