brintos

brintos / llvm-project-archived public Read only

0
0
Text · 910 B · a2d2d9b Raw
31 lines · plain
1// RUN: mlir-opt -mlir-print-unique-ssa-ids %s | FileCheck %s2// RUN: mlir-opt -mlir-print-op-generic %s | FileCheck %s3// RUN: mlir-opt %s | FileCheck %s --check-prefix=LOCAL_SCOPE4 5// CHECK: %arg36// CHECK: %77// LOCAL_SCOPE-NOT: %arg38// LOCAL_SCOPE-NOT: %79module {10  func.func @uniqueSSAIDs(%arg0 : memref<i32>, %arg1 : memref<i32>) {11    %c0 = arith.constant 0 : index12    %c1 = arith.constant 1 : index13    %c8 = arith.constant 8 : index14    scf.for %arg2 = %c0 to %c8 step %c1 {15      %a = memref.load %arg0[] : memref<i32>16      %b = memref.load %arg1[] : memref<i32>17      %0 = arith.addi %a, %b : i3218      %1 = arith.subi %a, %b : i3219      scf.yield20    }21    scf.for %arg2 = %c0 to %c8 step %c1 {22      %a = memref.load %arg0[] : memref<i32>23      %b = memref.load %arg1[] : memref<i32>24      %0 = arith.addi %a, %b : i3225      %1 = arith.subi %a, %b : i3226      scf.yield27    }28    return29  }30}31