[all-commits] [llvm/llvm-project] bd6add: [X86][APX] Suppress EGPR/NDD instructions for relo...

Feng Zou via All-commits all-commits at lists.llvm.org
Tue Apr 29 04:13:22 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bd6addc032b1ea764494e2de135b5b2c46ee6aca
      https://github.com/llvm/llvm-project/commit/bd6addc032b1ea764494e2de135b5b2c46ee6aca
  Author: Feng Zou <feng.zou at intel.com>
  Date:   2025-04-29 (Tue, 29 Apr 2025)

  Changed paths:
    M llvm/lib/Target/X86/CMakeLists.txt
    M llvm/lib/Target/X86/X86.h
    M llvm/lib/Target/X86/X86CompressEVEX.cpp
    M llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
    M llvm/lib/Target/X86/X86InstrInfo.cpp
    M llvm/lib/Target/X86/X86InstrInfo.h
    M llvm/lib/Target/X86/X86RegisterInfo.cpp
    M llvm/lib/Target/X86/X86RegisterInfo.h
    A llvm/lib/Target/X86/X86SuppressAPXForReloc.cpp
    M llvm/lib/Target/X86/X86TargetMachine.cpp
    M llvm/test/CodeGen/X86/O0-pipeline.ll
    M llvm/test/CodeGen/X86/apx/add.ll
    M llvm/test/CodeGen/X86/apx/and.ll
    M llvm/test/CodeGen/X86/apx/compress-evex.mir
    M llvm/test/CodeGen/X86/apx/dec.ll
    M llvm/test/CodeGen/X86/apx/flags-copy-lowering.ll
    M llvm/test/CodeGen/X86/apx/flags-copy-lowering.mir
    M llvm/test/CodeGen/X86/apx/imul.ll
    M llvm/test/CodeGen/X86/apx/inc.ll
    M llvm/test/CodeGen/X86/apx/neg.ll
    M llvm/test/CodeGen/X86/apx/or.ll
    A llvm/test/CodeGen/X86/apx/reloc.mir
    M llvm/test/CodeGen/X86/apx/shl.ll
    M llvm/test/CodeGen/X86/apx/shr.ll
    M llvm/test/CodeGen/X86/apx/sub.ll
    A llvm/test/CodeGen/X86/apx/tls.ll
    M llvm/test/CodeGen/X86/apx/xor.ll
    M llvm/test/CodeGen/X86/opt-pipeline.ll

  Log Message:
  -----------
  [X86][APX] Suppress EGPR/NDD instructions for relocations (#136660)

Suppress EGPR/NDD instructions for relocations to avoid APX relocation
types emitted. This is to keep backward compatibility with old version
of linkers without APX support. The use case is to try APX features with
LLVM + old built-in linker on RHEL9 OS which is expected to be EOL in
2032.
If there are APX relocation types, the old version of linkers would
raise "unsupported relocation type" error. Example:
```
$ llvm-mc -filetype=obj -o got.o -triple=x86_64-unknown-linux got.s
$ ld got.o -o got.exe
ld: got.o: unsupported relocation type 0x2b
...

$ cat got.s
...
movq foo at GOTPCREL(%rip), %r16

$ llvm-objdump -dr got.o
...
1: d5 48 8b 05 00 00 00 00       movq    (%rip), %r16
0000000000000005:  R_X86_64_CODE_4_GOTPCRELX    foo-0x4
```



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list