[llvm] [BOLT][NFC] Add isRIPRel and isIndexed helpers (PR #91661)
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Fri May 24 14:05:09 PDT 2024
================
@@ -1932,6 +1932,19 @@ class X86MCPlusBuilder : public MCPlusBuilder {
// = R_X86_64_PC32(Ln) + En - JT
// = R_X86_64_PC32(Ln + offsetof(En))
//
+ auto isRIPRel = [&](X86MemOperand &MO) {
+ // NB: DispExpr should be set
+ return MO.DispExpr != nullptr &&
----------------
dcci wrote:
this is adding this extra check, `MO.DispExpr != nullptr` -- why?
https://github.com/llvm/llvm-project/pull/91661
More information about the llvm-commits
mailing list