[PATCH] D64948: IR: Teach Constant::needsRelocation() that relative pointers don't need to be relocated.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 18 14:04:21 PDT 2019


pcc marked an inline comment as done.
pcc added inline comments.


================
Comment at: llvm/lib/IR/Constants.cpp:518
+        // indirect goto extension, so we handle it efficiently here.
+        if (isa<BlockAddress>(LHSOp0) && isa<BlockAddress>(LHSOp0) &&
+            cast<BlockAddress>(LHSOp0)->getFunction() ==
----------------
ychen wrote:
> Second `isa<BlockAddress>(LHSOp0)` -> `isa<BlockAddress>(RHSOp0)` ? 
Good catch, fixed in r366497.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D64948





More information about the llvm-commits mailing list