[all-commits] [llvm/llvm-project] 8b0a9d: [X86] Fix wrong RIP-relative relocations for AVX10...

Fangrui Song via All-commits all-commits at lists.llvm.org
Sun Mar 8 23:06:54 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8b0a9d081f203517bae40dcdcceba7f5f7a2c651
      https://github.com/llvm/llvm-project/commit/8b0a9d081f203517bae40dcdcceba7f5f7a2c651
  Author: Fangrui Song <i at maskray.me>
  Date:   2026-03-08 (Sun, 08 Mar 2026)

  Changed paths:
    M llvm/lib/Target/X86/X86InstrAVX10.td
    A llvm/test/MC/X86/Relocations/avx10.2satcvt.s

  Log Message:
  -----------
  [X86] Fix wrong RIP-relative relocations for AVX10.2 saturation conversions (#185254)

AVX10.2 saturation conversion instructions (VCVT{T}{BF16,PH,PS}2I{U}BS)
incorrectly inherited from AVX512{PS,XD,PD}Ii8Base, which sets
ImmT=Imm8. This caused X86MCCodeEmitter to account for a nonexistent
trailing immediate byte when computing RIP-relative displacement fixups,
producing an addend of -5 instead of the correct -4.

Replace AVX512PSIi8Base/AVX512XDIi8Base/AVX512PDIi8Base with just the
needed prefix classes (PS is default, XD, PD), dropping the bogus
ImmT=Imm8. Preserve the original ExeDomain values (SSEPackedSingle,
SSEPackedDouble, SSEPackedInt; verified with `llvm-tblgen
--print-records ./llvm/lib/Target/X86/X86.td -I./llvm/include/
-I./llvm/lib/Target/X86/`). ExeDomain is not covered by any test.

Fix https://github.com/llvm/llvm-project/issues/184251



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