[PATCH] D84833: Implement indirect branch generation in position independent code for the RISC-V target

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 29 07:54:46 PDT 2020


jrtc27 added a comment.

You've lost the check for the non-PIC one and didn't check that the PIC one actually assembles (it really should, but you never know; the point is that unless you emit a .o the fixups are never actually computed and thus you won't get errors if they end up overflowing).



================
Comment at: llvm/test/CodeGen/RISCV/branch-relaxation.ll:2-3
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
 ; RUN: llc -mtriple=riscv32 -verify-machineinstrs -filetype=obj < %s \
 ; RUN:   -o /dev/null 2>&1
+; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s
----------------



================
Comment at: llvm/test/CodeGen/RISCV/branch-relaxation.ll:4
 ; RUN:   -o /dev/null 2>&1
-; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s | FileCheck %s
+; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s
+; RUN: llc -mtriple=riscv32 -relocation-model=pic -verify-machineinstrs < %s
----------------



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

https://reviews.llvm.org/D84833



More information about the llvm-commits mailing list