[all-commits] [llvm/llvm-project] fa1d3e: [X86][NFC] Share isDispOrCDisp8 between the encode...

nishant-sachdeva-amd via All-commits all-commits at lists.llvm.org
Fri Sep 11 00:08:43 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fa1d3e300559d69678a66b2ddb45eb127a1b8407
      https://github.com/llvm/llvm-project/commit/fa1d3e300559d69678a66b2ddb45eb127a1b8407
  Author: nishant-sachdeva-amd <nishant.sachdeva at amd.com>
  Date:   2026-09-11 (Fri, 11 Sep 2026)

  Changed paths:
    M llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h
    M llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
    M llvm/lib/Target/X86/X86CompressEVEX.cpp

  Log Message:
  -----------
  [X86][NFC] Share isDispOrCDisp8 between the encoder and CompressEVEX (#222591)

The disp8 / compressed-disp8*N size rule was written twice: as a static
helper in X86MCCodeEmitter.cpp and re-inlined in the CompressEVEX size
veto (hasShorterEVEXViaCDisp8), kept in sync only by a comment. Hoist it
into X86II::isDispOrCDisp8 in X86BaseInfo.h (ImmOffset now optional) and
call it from both, so the size model cannot drift from what the encoder
emits. No functional change.


Addresses https://github.com/llvm/llvm-project/issues/206963 

Changes made here use AI model inputs

---------

Co-authored-by: Simon Pilgrim <git at redking.me.uk>



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