[PATCH] D143226: [MC][CodeGen] Introduce handling for R_RISCV_PLT32 relocation

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 3 14:31:00 PST 2023


jrtc27 added inline comments.


================
Comment at: llvm/test/CodeGen/RISCV/dso_local_equivalent.ll:1
+; RUN: llc -mtriple=riscv64 -relocation-model=pic -data-sections -o - %s --asm-verbose=0 | FileCheck %s
+
----------------
Use update_llc_test_checks.py


================
Comment at: llvm/test/CodeGen/RISCV/dso_local_equivalent.ll:4
+;; Just ensure that we can write to an object file without error.
+; RUN: llc -filetype=obj -mtriple=riscv64 -relocation-model=pic -data-sections -o /dev/null %s
+
----------------
If we're producing assembly that we test in an MC test we don't need this. Generally best to not do object file tests in CodeGen.


================
Comment at: llvm/test/CodeGen/RISCV/dso_local_equivalent.ll:9
+; CHECK: const:
+; CHECK:   .word   extern_func at PLT
+ at const = constant i32 trunc (i64 ptrtoint (ptr dso_local_equivalent @extern_func to i64) to i32)
----------------
This isn't PC-relative


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143226/new/

https://reviews.llvm.org/D143226



More information about the llvm-commits mailing list