brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 1a41c8d Raw
37 lines · plain
1// RUN: tco %s | FileCheck %s2 3 4// In flang pipeline, the inliner calls createCanonicalizerPass with the region5// simplification disabled. The inliner pass does canonicalization even if6// no inlining happens. After canonicalization, FIR lite region simplification7// must be called to get rid of unreachable regions.8// This code exposes the need to run SimplifyRegionLitePass after the inliner is9// called with FIR pipeline.10 11 12func.func @repro(%arg0: i8, %arg1: i8) {13  %c34_i8 = arith.constant 34 : i814  %c-1_i8 = arith.constant -1 : i815  %2 = arith.xori %c34_i8, %c-1_i8 : i816  %3 = arith.andi %arg0, %c34_i8 : i817  %4 = arith.andi %arg1, %2 : i818  %5 = arith.ori %3, %4 : i819  %c34_i8_0 = arith.constant 34 : i820  %7 = arith.andi %arg0, %c34_i8_0 : i821  %c-35_i8 = arith.constant -35 : i822  %9 = arith.andi %arg1, %c-35_i8 : i823  %10 = arith.ori %7, %9 : i824  %11 = arith.cmpi ne, %5, %10 : i825  cf.cond_br %11, ^bb1, ^bb226^bb1:  // pred: ^bb027  %13 = func.call @foo() : () -> none28  cf.br ^bb229^bb2:  // pred: ^bb0, ^bb230  return31}32func.func private @foo() -> none33 34 35// CHECK: define void @repro(i8 %0, i8 %1)36// CHECK-NEXT: ret void37