49 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -disable-output -S -passes=print-ir-similarity < %s 2>&1 | FileCheck --allow-empty %s3 4; Check to make sure that the IRSimilarityIdentifier and IRSimilarityPrinterPass5; return items only within the same function when there are different sets of6; instructions in functions.7 8; CHECK: 2 candidates of length 5. Found in:9; CHECK-NEXT: Function: fish, Basic Block: entry10; CHECK-NEXT: Start Instruction: store i32 6, ptr %0, align 411; CHECK-NEXT: End Instruction: store i32 4, ptr %4, align 412; CHECK-NEXT: Function: fish, Basic Block: entry13; CHECK-NEXT: Start Instruction: store i32 1, ptr %1, align 414; CHECK-NEXT: End Instruction: store i32 5, ptr %5, align 415; CHECK-NEXT: 2 candidates of length 3. Found in:16; CHECK-NEXT: Function: turtle, Basic Block: (unnamed)17; CHECK-NEXT: Start Instruction: %b = load i32, ptr %1, align 418; CHECK-NEXT: End Instruction: %d = load i32, ptr %3, align 419; CHECK-NEXT: Function: turtle, Basic Block: (unnamed)20; CHECK-NEXT: Start Instruction: %a = load i32, ptr %0, align 421; CHECK-NEXT: End Instruction: %c = load i32, ptr %2, align 422 23define linkonce_odr void @fish() {24entry:25 %0 = alloca i32, align 426 %1 = alloca i32, align 427 %2 = alloca i32, align 428 %3 = alloca i32, align 429 %4 = alloca i32, align 430 %5 = alloca i32, align 431 store i32 6, ptr %0, align 432 store i32 1, ptr %1, align 433 store i32 2, ptr %2, align 434 store i32 3, ptr %3, align 435 store i32 4, ptr %4, align 436 store i32 5, ptr %5, align 437 ret void38}39 40define void @turtle(ptr %0, ptr %1, ptr %2, ptr %3) {41 %a = load i32, ptr %042 %b = load i32, ptr %143 %c = load i32, ptr %244 %d = load i32, ptr %345 ret void46}47;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:48; CHECK: {{.*}}49