brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.7 KiB · 4c16759 Raw
78 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --include-generated-funcs2; RUN: opt -S -passes=verify,iroutliner -ir-outlining-no-cost < %s | FileCheck %s3 4; This checks that we are able to outline exactly the same branch structure5; while also outlining similar items on either side of the branch.6 7define void @outline_outputs1() #0 {8entry:9  %a = alloca i32, align 410  %b = alloca i32, align 411  %output = alloca i32, align 412  %result = alloca i32, align 413  %output2 = alloca i32, align 414  %result2 = alloca i32, align 415  store i32 2, ptr %a, align 416  store i32 3, ptr %b, align 417  br label %next18next:19  store i32 2, ptr %output, align 420  store i32 3, ptr %result, align 421  ret void22}23 24define void @outline_outputs2() #0 {25entry:26  %a = alloca i32, align 427  %b = alloca i32, align 428  %output = alloca i32, align 429  %result = alloca i32, align 430  %output2 = alloca i32, align 431  %result2 = alloca i32, align 432  store i32 2, ptr %a, align 433  store i32 3, ptr %b, align 434  br label %next35next:36  store i32 2, ptr %output, align 437  store i32 3, ptr %result, align 438  ret void39}40; CHECK-LABEL: @outline_outputs1(41; CHECK-NEXT:  entry:42; CHECK-NEXT:    [[A:%.*]] = alloca i32, align 443; CHECK-NEXT:    [[B:%.*]] = alloca i32, align 444; CHECK-NEXT:    [[OUTPUT:%.*]] = alloca i32, align 445; CHECK-NEXT:    [[RESULT:%.*]] = alloca i32, align 446; CHECK-NEXT:    [[OUTPUT2:%.*]] = alloca i32, align 447; CHECK-NEXT:    [[RESULT2:%.*]] = alloca i32, align 448; CHECK-NEXT:    call void @outlined_ir_func_0(ptr [[A]], ptr [[B]], ptr [[OUTPUT]], ptr [[RESULT]])49; CHECK-NEXT:    ret void50;51;52; CHECK-LABEL: @outline_outputs2(53; CHECK-NEXT:  entry:54; CHECK-NEXT:    [[A:%.*]] = alloca i32, align 455; CHECK-NEXT:    [[B:%.*]] = alloca i32, align 456; CHECK-NEXT:    [[OUTPUT:%.*]] = alloca i32, align 457; CHECK-NEXT:    [[RESULT:%.*]] = alloca i32, align 458; CHECK-NEXT:    [[OUTPUT2:%.*]] = alloca i32, align 459; CHECK-NEXT:    [[RESULT2:%.*]] = alloca i32, align 460; CHECK-NEXT:    call void @outlined_ir_func_0(ptr [[A]], ptr [[B]], ptr [[OUTPUT]], ptr [[RESULT]])61; CHECK-NEXT:    ret void62;63;64; CHECK: define internal void @outlined_ir_func_0(65; CHECK:  newFuncRoot:66; CHECK-NEXT:    br label [[ENTRY_TO_OUTLINE:%.*]]67; CHECK:       entry_to_outline:68; CHECK-NEXT:    store i32 2, ptr [[TMP0:%.*]], align 469; CHECK-NEXT:    store i32 3, ptr [[TMP1:%.*]], align 470; CHECK-NEXT:    br label [[NEXT:%.*]]71; CHECK:       next:72; CHECK-NEXT:    store i32 2, ptr [[TMP2:%.*]], align 473; CHECK-NEXT:    store i32 3, ptr [[TMP3:%.*]], align 474; CHECK-NEXT:    br label [[ENTRY_AFTER_OUTLINE_EXITSTUB:%.*]]75; CHECK:       entry_after_outline.exitStub:76; CHECK-NEXT:    ret void77;78