brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.3 KiB · 42b30eb Raw
82 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -passes=instcombine -S | FileCheck %s3 4target datalayout = "e-p:32:32"5target triple = "i686-pc-linux-gnu"6@r = external global [17 x i32]         ; <ptr> [#uses=1]7 8define i1 @print_pgm_cond_true(i32 %tmp12.reload, ptr %tmp16.out) {9; CHECK-LABEL: @print_pgm_cond_true(10; CHECK-NEXT:  newFuncRoot:11; CHECK-NEXT:    br label [[COND_TRUE:%.*]]12; CHECK:       bb27.exitStub:13; CHECK-NEXT:    store i32 [[TMP16:%.*]], ptr [[TMP16_OUT:%.*]], align 414; CHECK-NEXT:    ret i1 true15; CHECK:       cond_next23.exitStub:16; CHECK-NEXT:    store i32 [[TMP16]], ptr [[TMP16_OUT]], align 417; CHECK-NEXT:    ret i1 false18; CHECK:       cond_true:19; CHECK-NEXT:    [[TMP15:%.*]] = getelementptr i32, ptr @r, i32 [[TMP12_RELOAD:%.*]]20; CHECK-NEXT:    [[TMP16]] = load i32, ptr [[TMP15]], align 421; CHECK-NEXT:    [[TMP0:%.*]] = add i32 [[TMP16]], -3222; CHECK-NEXT:    [[BOTHCOND:%.*]] = icmp ult i32 [[TMP0]], -6323; CHECK-NEXT:    br i1 [[BOTHCOND]], label [[BB27_EXITSTUB:%.*]], label [[COND_NEXT23_EXITSTUB:%.*]]24;25newFuncRoot:26  br label %cond_true27 28bb27.exitStub:          ; preds = %cond_true29  store i32 %tmp16, ptr %tmp16.out30  ret i1 true31 32cond_next23.exitStub:           ; preds = %cond_true33  store i32 %tmp16, ptr %tmp16.out34  ret i1 false35 36cond_true:              ; preds = %newFuncRoot37  %tmp15 = getelementptr [17 x i32], ptr @r, i32 0, i32 %tmp12.reload         ; <ptr> [#uses=1]38  %tmp16 = load i32, ptr %tmp15               ; <i32> [#uses=4]39  %tmp18 = icmp slt i32 %tmp16, -31               ; <i1> [#uses=1]40  %tmp21 = icmp sgt i32 %tmp16, 31                ; <i1> [#uses=1]41  %bothcond = or i1 %tmp18, %tmp21                ; <i1> [#uses=1]42  br i1 %bothcond, label %bb27.exitStub, label %cond_next23.exitStub43}44 45define i1 @print_pgm_cond_true_logical(i32 %tmp12.reload, ptr %tmp16.out) {46; CHECK-LABEL: @print_pgm_cond_true_logical(47; CHECK-NEXT:  newFuncRoot:48; CHECK-NEXT:    br label [[COND_TRUE:%.*]]49; CHECK:       bb27.exitStub:50; CHECK-NEXT:    store i32 [[TMP16:%.*]], ptr [[TMP16_OUT:%.*]], align 451; CHECK-NEXT:    ret i1 true52; CHECK:       cond_next23.exitStub:53; CHECK-NEXT:    store i32 [[TMP16]], ptr [[TMP16_OUT]], align 454; CHECK-NEXT:    ret i1 false55; CHECK:       cond_true:56; CHECK-NEXT:    [[TMP15:%.*]] = getelementptr i32, ptr @r, i32 [[TMP12_RELOAD:%.*]]57; CHECK-NEXT:    [[TMP16]] = load i32, ptr [[TMP15]], align 458; CHECK-NEXT:    [[TMP0:%.*]] = add i32 [[TMP16]], -3259; CHECK-NEXT:    [[BOTHCOND:%.*]] = icmp ult i32 [[TMP0]], -6360; CHECK-NEXT:    br i1 [[BOTHCOND]], label [[BB27_EXITSTUB:%.*]], label [[COND_NEXT23_EXITSTUB:%.*]]61;62newFuncRoot:63  br label %cond_true64 65bb27.exitStub:          ; preds = %cond_true66  store i32 %tmp16, ptr %tmp16.out67  ret i1 true68 69cond_next23.exitStub:           ; preds = %cond_true70  store i32 %tmp16, ptr %tmp16.out71  ret i1 false72 73cond_true:              ; preds = %newFuncRoot74  %tmp15 = getelementptr [17 x i32], ptr @r, i32 0, i32 %tmp12.reload         ; <ptr> [#uses=1]75  %tmp16 = load i32, ptr %tmp15               ; <i32> [#uses=4]76  %tmp18 = icmp slt i32 %tmp16, -31               ; <i1> [#uses=1]77  %tmp21 = icmp sgt i32 %tmp16, 31                ; <i1> [#uses=1]78  %bothcond = select i1 %tmp18, i1 true, i1 %tmp21                ; <i1> [#uses=1]79  br i1 %bothcond, label %bb27.exitStub, label %cond_next23.exitStub80}81 82