llvm.org GIT mirror llvm / 8e02a4b
Fix tests after move to utohexstr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321527 91177308-0d34-0410-b5e6-96231b3b80d8 Benjamin Kramer 2 years ago
7 changed file(s) with 15 addition(s) and 15 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: opt -S -demanded-bits -analyze < %s | FileCheck %s
11 ; RUN: opt -S -disable-output -passes="print" < %s 2>&1 | FileCheck %s
22
3 ; CHECK-DAG: DemandedBits: 0xFF for %1 = add nsw i32 %a, 5
4 ; CHECK-DAG: DemandedBits: 0xFF for %3 = trunc i32 %2 to i8
5 ; CHECK-DAG: DemandedBits: 0xFF for %2 = mul nsw i32 %1, %b
3 ; CHECK-DAG: DemandedBits: 0xff for %1 = add nsw i32 %a, 5
4 ; CHECK-DAG: DemandedBits: 0xff for %3 = trunc i32 %2 to i8
5 ; CHECK-DAG: DemandedBits: 0xff for %2 = mul nsw i32 %1, %b
66 define i8 @test_mul(i32 %a, i32 %b) {
77 %1 = add nsw i32 %a, 5
88 %2 = mul nsw i32 %1, %b
0 ; RUN: opt -S -demanded-bits -analyze < %s | FileCheck %s
11 ; RUN: opt -S -disable-output -passes="print" < %s 2>&1 | FileCheck %s
22
3 ; CHECK-DAG: DemandedBits: 0xFF000000 for %1 = or i32 %x, 1
4 ; CHECK-DAG: DemandedBits: 0xFF for %2 = call i32 @llvm.bitreverse.i32(i32 %1)
5 ; CHECK-DAG: DemandedBits: 0xFF for %3 = trunc i32 %2 to i8
3 ; CHECK-DAG: DemandedBits: 0xff000000 for %1 = or i32 %x, 1
4 ; CHECK-DAG: DemandedBits: 0xff for %2 = call i32 @llvm.bitreverse.i32(i32 %1)
5 ; CHECK-DAG: DemandedBits: 0xff for %3 = trunc i32 %2 to i8
66 define i8 @test_bswap(i32 %x) {
77 %1 = or i32 %x, 1
88 %2 = call i32 @llvm.bswap.i32(i32 %1)
1111 }
1212 declare i32 @llvm.bswap.i32(i32)
1313
14 ; CHECK-DAG: DemandedBits: 0xFF000000 for %1 = or i32 %x, 1
15 ; CHECK-DAG: DemandedBits: 0xFF for %2 = call i32 @llvm.bswap.i32(i32 %1)
16 ; CHECK-DAG: DemandedBits: 0xFF for %3 = trunc i32 %2 to i8
14 ; CHECK-DAG: DemandedBits: 0xff000000 for %1 = or i32 %x, 1
15 ; CHECK-DAG: DemandedBits: 0xff for %2 = call i32 @llvm.bswap.i32(i32 %1)
16 ; CHECK-DAG: DemandedBits: 0xff for %3 = trunc i32 %2 to i8
1717 define i8 @test_bitreverse(i32 %x) {
1818 %1 = or i32 %x, 1
1919 %2 = call i32 @llvm.bitreverse.i32(i32 %1)
5656 # return w;
5757 # }
5858 #
59 # CHECK: 129: eb 13 jmp 19 E>
59 # CHECK: 129: eb 13 jmp 19 e>
6060 # CHECK: 12e: eb a0 jmp -96
6161 # CHECK: 132: eb 9c jmp -100
6262 # CHECK: 137: eb 97 jmp -105
66 @ RUN: | FileCheck %s -check-prefix CHECK-THUMB
77
88 b.w .Lbranch
9 @ CHECK-ARM: b #4 <$a.0+0xC>
10 @ CHECK-THUMB: b.w #8 <$t.0+0xC>
9 @ CHECK-ARM: b #4 <$a.0+0xc>
10 @ CHECK-THUMB: b.w #8 <$t.0+0xc>
1111 adds r0, r1, #42
1212 adds r1, r2, #42
1313 .Lbranch:
88
99 // RUN: llvm-cov show %S/Inputs/binary-formats.v1.linux64l -instr-profile %S/Inputs/elf_binary_comdat.profdata -path-equivalence=/tmp,%S/Inputs %S/Inputs/instrprof-comdat.h -dump 2> %t.err | FileCheck --check-prefix=HEADER %S/Inputs/instrprof-comdat.h
1010 // RUN: FileCheck --check-prefix=ERROR -input-file %t.err %s
11 // ERROR: hash-mismatch: No profile record found for 'main' with hash = 0xA
11 // ERROR: hash-mismatch: No profile record found for 'main' with hash = 0xa
1212
1313 // RUN: llvm-cov show %S/Inputs/binary-formats.v2.linux64l -instr-profile %S/Inputs/elf_binary_comdat.profdata -path-equivalence=/root/llvm/test/tools,%S/.. %S/Inputs/instrprof-comdat.h | FileCheck --check-prefix=HEADER %S/Inputs/instrprof-comdat.h
1414 // RUN: llvm-cov show %S/Inputs/binary-formats.v2.linux32l -instr-profile %S/Inputs/elf_binary_comdat.profdata -path-equivalence=/root/llvm/R/../test/tools,%S/.. %S/Inputs/instrprof-comdat.h | FileCheck --check-prefix=HEADER %S/Inputs/instrprof-comdat.h
22
33 # RUN: llvm-objdump -d %p/Inputs/hello.exe.macho-i386 | FileCheck %s
44
5 # CHECK: 1f47: e8 00 00 00 00 calll 0 <_main+0xC>
5 # CHECK: 1f47: e8 00 00 00 00 calll 0 <_main+0xc>
766766 for (uintptr_t I = TableStart; I < TableEnd; I += EntrySize) {
767767 uint32_t RVA = *reinterpret_cast(I);
768768 raw_ostream &OS = W.startLine();
769 OS << "0x" << Twine::utohexstr(Obj->getImageBase() + RVA);
769 OS << "0x" << W.hex(Obj->getImageBase() + RVA);
770770 if (PrintExtra)
771771 PrintExtra(OS, reinterpret_cast(I));
772772 OS << '\n';