brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 6c94b9f Raw
23 lines · plain
1; RUN: llc -mtriple=riscv64 < %s | FileCheck %s2 3@vtable = constant [5 x i32] [i32 0,4    i32 trunc (i64 sub (i64 ptrtoint (ptr @fn1 to i64), i64 ptrtoint (ptr getelementptr ([5 x i32], ptr @vtable, i32 0, i32 1) to i64)) to i32),5    i32 trunc (i64 sub (i64 ptrtoint (ptr @fn2 to i64), i64 ptrtoint (ptr getelementptr ([5 x i32], ptr @vtable, i32 0, i32 1) to i64)) to i32),6    i32 trunc (i64 sub (i64 ptrtoint (ptr @fn3 to i64), i64 ptrtoint (ptr getelementptr ([5 x i32], ptr @vtable, i32 0, i32 1) to i64)) to i32),7    i32 trunc (i64 sub (i64 ptrtoint (ptr @global4 to i64), i64 ptrtoint (ptr getelementptr ([5 x i32], ptr @vtable, i32 0, i32 1) to i64)) to i32)8]9 10declare void @fn1() unnamed_addr11declare void @fn2() unnamed_addr12declare void @fn3()13@global4 = external unnamed_addr global i814 15;; Create a PC-relative relocation that the linker might decline if the addend symbol is preemptible.16; CHECK:      vtable:17; CHECK-NEXT:         .word   0                               # 0x018; CHECK-NEXT:         .word   fn1-vtable-419; CHECK-NEXT:         .word   fn2-vtable-420; CHECK-NEXT:         .word   fn3-vtable-421; CHECK-NEXT:         .word   global4-vtable-422; CHECK-NEXT:         .size   vtable, 2023