[all-commits] [llvm/llvm-project] 027c16: [X86ISelLowering] permit BlockAddressSDNode "i" co...

Nick Desaulniers via All-commits all-commits at lists.llvm.org
Thu Feb 17 10:55:12 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 027c16bef4b727095eea00bbef9266f1f4a78c27
      https://github.com/llvm/llvm-project/commit/027c16bef4b727095eea00bbef9266f1f4a78c27
  Author: Nick Desaulniers <ndesaulniers at google.com>
  Date:   2022-02-17 (Thu, 17 Feb 2022)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/inline-asm-pic.ll

  Log Message:
  -----------
  [X86ISelLowering] permit BlockAddressSDNode "i" constraints for PIC

When building 32b x86 code as PIC, the existing handling of "i"
constraints is conservative since generally we have to go through the
GOT to find references to functions.

But generally, BlockAddresses from C code refer to the Function in the
current TU.  Permit BlockAddresses to be used with the "i" constraint
for those cases.

I regressed this in
commit 4edb9983cb8c ("[SelectionDAG] treat X constrained labels as i for asm")

Fixes: https://github.com/llvm/llvm-project/issues/53868

Reviewed By: efriedma, MaskRay

Differential Revision: https://reviews.llvm.org/D119905




More information about the All-commits mailing list