41 lines · plain
1; RUN: llc < %s -mtriple=i686-- -mattr=+cmov -x86-cmov-converter=false | FileCheck %s2;3; Test scheduling a multi-use compare. We should neither spill flags4; nor clone the compare.5; CHECK: cmp6; CHECK-NOT: pushf7; CHECK: cmov8; CHECK-NOT: cmp9; CHECK: cmov10 11 %struct.indexentry = type { i32, ptr, ptr, ptr, ptr, ptr }12 13define i32 @_bfd_stab_section_find_nearest_line(i32 %offset, i1 %cond) nounwind {14entry:15 %tmp910 = add i32 0, %offset ; <i32> [#uses=1]16 br i1 %cond, label %bb951, label %bb91717 18bb917: ; preds = %entry19 ret i32 020 21bb951: ; preds = %bb986, %entry22 %tmp955 = sdiv i32 %offset, 2 ; <i32> [#uses=3]23 %tmp961 = getelementptr %struct.indexentry, ptr null, i32 %tmp955, i32 0 ; <ptr> [#uses=1]24 br i1 %cond, label %bb986, label %bb96725 26bb967: ; preds = %bb95127 ret i32 028 29bb986: ; preds = %bb95130 %tmp993 = load i32, ptr %tmp961, align 4 ; <i32> [#uses=1]31 %tmp995 = icmp ugt i32 %tmp993, %tmp910 ; <i1> [#uses=2]32 %tmp1002 = add i32 %tmp955, 1 ; <i32> [#uses=1]33 %low.0 = select i1 %tmp995, i32 0, i32 %tmp1002 ; <i32> [#uses=1]34 %high.0 = select i1 %tmp995, i32 %tmp955, i32 0 ; <i32> [#uses=1]35 %tmp1006 = icmp eq i32 %low.0, %high.0 ; <i1> [#uses=1]36 br i1 %tmp1006, label %UnifiedReturnBlock, label %bb95137 38UnifiedReturnBlock: ; preds = %bb98639 ret i32 140}41