|
1 | | -; RUN: opt -S -passes=lowertypetests -mtriple=i686-unknown-linux-gnu %s | FileCheck --check-prefixes=X86,X86-LINUX,NATIVE %s |
2 | | -; RUN: opt -S -passes=lowertypetests -mtriple=x86_64-unknown-linux-gnu %s | FileCheck --check-prefixes=X86,X86-LINUX,NATIVE %s |
3 | | -; RUN: opt -S -passes=lowertypetests -mtriple=i686-pc-win32 %s | FileCheck --check-prefixes=X86,X86-WIN32,NATIVE %s |
4 | | -; RUN: opt -S -passes=lowertypetests -mtriple=x86_64-pc-win32 %s | FileCheck --check-prefixes=X86,X86-WIN32,NATIVE %s |
5 | | -; RUN: opt -S -passes=lowertypetests -mtriple=riscv32-unknown-linux-gnu %s | FileCheck --check-prefixes=RISCV,NATIVE %s |
6 | | -; RUN: opt -S -passes=lowertypetests -mtriple=riscv64-unknown-linux-gnu %s | FileCheck --check-prefixes=RISCV,NATIVE %s |
| 1 | +; RUN: opt -S -passes=lowertypetests -mtriple=i686-unknown-linux-gnu %s | FileCheck --check-prefixes=X86,X86-LINUX,NATIVE,JT8 %s |
| 2 | +; RUN: opt -S -passes=lowertypetests -mtriple=x86_64-unknown-linux-gnu %s | FileCheck --check-prefixes=X86,X86-LINUX,NATIVE,JT8 %s |
| 3 | +; RUN: opt -S -passes=lowertypetests -mtriple=i686-pc-win32 %s | FileCheck --check-prefixes=X86,X86-WIN32,NATIVE,JT8 %s |
| 4 | +; RUN: opt -S -passes=lowertypetests -mtriple=x86_64-pc-win32 %s | FileCheck --check-prefixes=X86,X86-WIN32,NATIVE,JT8 %s |
| 5 | +; RUN: opt -S -passes=lowertypetests -mtriple=riscv32-unknown-linux-gnu %s | FileCheck --check-prefixes=RISCV,NATIVE,JT8 %s |
| 6 | +; RUN: opt -S -passes=lowertypetests -mtriple=riscv64-unknown-linux-gnu %s | FileCheck --check-prefixes=RISCV,NATIVE,JT8 %s |
7 | 7 | ; RUN: opt -S -passes=lowertypetests -mtriple=wasm32-unknown-unknown %s | FileCheck --check-prefix=WASM32 %s |
8 | | -; RUN: opt -S -passes=lowertypetests -mtriple=loongarch64-unknown-linux-gnu %s | FileCheck --check-prefixes=LOONGARCH64,NATIVE %s |
| 8 | +; RUN: opt -S -passes=lowertypetests -mtriple=loongarch64-unknown-linux-gnu %s | FileCheck --check-prefixes=LOONGARCH64,NATIVE,JT8 %s |
9 | 9 |
|
10 | 10 | ; The right format for Arm jump tables depends on the selected |
11 | 11 | ; subtarget, so we can't get these tests right without the Arm target |
12 | 12 | ; compiled in. |
13 | | -; RUN: %if arm-registered-target %{ opt -S -passes=lowertypetests -mtriple=arm-unknown-linux-gnu %s | FileCheck --check-prefixes=ARM,NATIVE %s %} |
14 | | -; RUN: %if arm-registered-target %{ opt -S -passes=lowertypetests -mtriple=thumbv7m-unknown-linux-gnu %s | FileCheck --check-prefixes=THUMB,NATIVE %s %} |
15 | | -; RUN: %if arm-registered-target %{ opt -S -passes=lowertypetests -mtriple=thumbv8m.base-unknown-linux-gnu %s | FileCheck --check-prefixes=THUMB,NATIVE %s %} |
16 | | -; RUN: %if arm-registered-target %{ opt -S -passes=lowertypetests -mtriple=thumbv6m-unknown-linux-gnu %s | FileCheck --check-prefixes=THUMBV6M,NATIVE %s %} |
17 | | -; RUN: %if arm-registered-target %{ opt -S -passes=lowertypetests -mtriple=thumbv5-unknown-linux-gnu %s | FileCheck --check-prefixes=ARM,NATIVE %s %} |
18 | | -; RUN: %if arm-registered-target %{ opt -S -passes=lowertypetests -mtriple=aarch64-unknown-linux-gnu %s | FileCheck --check-prefixes=ARM,NATIVE %s %} |
| 13 | +; RUN: %if arm-registered-target %{ opt -S -passes=lowertypetests -mtriple=arm-unknown-linux-gnu %s | FileCheck --check-prefixes=ARM,NATIVE,JT4 %s %} |
| 14 | +; RUN: %if arm-registered-target %{ opt -S -passes=lowertypetests -mtriple=thumbv7m-unknown-linux-gnu %s | FileCheck --check-prefixes=THUMB,NATIVE,JT4 %s %} |
| 15 | +; RUN: %if arm-registered-target %{ opt -S -passes=lowertypetests -mtriple=thumbv8m.base-unknown-linux-gnu %s | FileCheck --check-prefixes=THUMB,NATIVE,JT4 %s %} |
| 16 | +; RUN: %if arm-registered-target %{ opt -S -passes=lowertypetests -mtriple=thumbv6m-unknown-linux-gnu %s | FileCheck --check-prefixes=THUMBV6M,NATIVE,JT16 %s %} |
| 17 | +; RUN: %if arm-registered-target %{ opt -S -passes=lowertypetests -mtriple=thumbv5-unknown-linux-gnu %s | FileCheck --check-prefixes=ARM,NATIVE,JT4 %s %} |
| 18 | +; RUN: %if arm-registered-target %{ opt -S -passes=lowertypetests -mtriple=aarch64-unknown-linux-gnu %s | FileCheck --check-prefixes=ARM,NATIVE,JT4 %s %} |
19 | 19 |
|
20 | 20 | ; Tests that we correctly handle bitsets containing 2 or more functions. |
21 | 21 |
|
@@ -54,20 +54,18 @@ define internal void @g() !type !0 { |
54 | 54 | declare i1 @llvm.type.test(ptr %ptr, metadata %bitset) noinline readnone |
55 | 55 |
|
56 | 56 | define i1 @foo(ptr %p) { |
57 | | - ; NATIVE: sub i64 {{.*}}, ptrtoint (ptr @[[JT]] to i64) |
58 | | - ; WASM32: sub i64 {{.*}}, ptrtoint (ptr getelementptr (i8, ptr null, i64 1) to i64) |
| 57 | + ; JT4: sub i64 ptrtoint (ptr getelementptr (i8, ptr @[[JT]], i64 4) to i64), {{.*}} |
| 58 | + ; JT8: sub i64 ptrtoint (ptr getelementptr (i8, ptr @[[JT]], i64 8) to i64), {{.*}} |
| 59 | + ; JT16: sub i64 ptrtoint (ptr getelementptr (i8, ptr @[[JT]], i64 16) to i64), {{.*}} |
| 60 | + ; WASM32: sub i64 ptrtoint (ptr getelementptr (i8, ptr null, i64 2) to i64), {{.*}} |
59 | 61 | ; WASM32: icmp ule i64 {{.*}}, 1 |
60 | 62 | %x = call i1 @llvm.type.test(ptr %p, metadata !"typeid1") |
61 | 63 | ret i1 %x |
62 | 64 | } |
63 | 65 |
|
64 | | -; X86-LINUX: define private void @[[JT]]() #[[ATTR:.*]] align 8 { |
65 | | -; X86-WIN32: define private void @[[JT]]() #[[ATTR:.*]] align 8 { |
66 | | -; ARM: define private void @[[JT]]() #[[ATTR:.*]] align 4 { |
67 | | -; THUMB: define private void @[[JT]]() #[[ATTR:.*]] align 4 { |
68 | | -; THUMBV6M: define private void @[[JT]]() #[[ATTR:.*]] align 16 { |
69 | | -; RISCV: define private void @[[JT]]() #[[ATTR:.*]] align 8 { |
70 | | -; LOONGARCH64: define private void @[[JT]]() #[[ATTR:.*]] align 8 { |
| 66 | +; JT4: define private void @[[JT]]() #[[ATTR:.*]] align 4 { |
| 67 | +; JT8: define private void @[[JT]]() #[[ATTR:.*]] align 8 { |
| 68 | +; JT16: define private void @[[JT]]() #[[ATTR:.*]] align 16 { |
71 | 69 |
|
72 | 70 | ; X86: jmp ${0:c}@plt |
73 | 71 | ; X86-SAME: int3 |
|
0 commit comments