1 ; RUN: llc -mtriple=riscv64 < %s | FileCheck %s --match-full-lines
2 ; RUN: llc -mtriple=riscv32 < %s | FileCheck %s --match-full-lines
4 declare void @extern_func()
7 ; CHECK-NEXT: .word extern_func@PLT-const
9 ;; Note that for riscv32, the ptrtoint will actually upcast the ptr it to an
10 ;; oversized 64-bit pointer that eventually gets truncated. This isn't needed
11 ;; for riscv32, but this unifies the RV64 and RV32 test cases.
12 @const = dso_local constant i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @extern_func to i64), i64 ptrtoint (ptr @const to i64)) to i32)