[all-commits] [llvm/llvm-project] e7dcdf: [X86] LowerRESET_FPENV - use MOLoad for the consta...

mbhade-amd via All-commits all-commits at lists.llvm.org
Wed Jun 10 00:08:46 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e7dcdf00efaac9d859f39347ab2e32e19914ab6b
      https://github.com/llvm/llvm-project/commit/e7dcdf00efaac9d859f39347ab2e32e19914ab6b
  Author: mbhade-amd <mbhade at amd.com>
  Date:   2026-06-10 (Wed, 10 Jun 2026)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    A llvm/test/CodeGen/X86/reset-fpenv-mmo.ll

  Log Message:
  -----------
  [X86] LowerRESET_FPENV - use MOLoad for the constant-pool FLDENVm MMO (#201832)

LowerRESET_FPENV builds a MachineMemOperand with the MOStore flag and
attaches it to X86ISD::FLDENVm, which is mayLoad = 1. The direction
contradicts the SDNode, and SelectionDAGISel's memref filter (in
SelectCodeCommon) silently drops the MMO, leaving the final MachineInstr
without any memrefs - no miscompile, but no useful load-side metadata
either.

Sister path LowerGET_FPENV_MEM already flips MOStore -> MOLoad before
attaching its MMO to FLDENVm. Match that here so the MMO survives ISel.

Adds a MIR-trailer regression test asserting FLDENVm carries the
expected `:: (load (s224) from constant-pool, align 4)` memref.

This was found as part of @jlebar's X86 LLVM bug hunt / FuzzX effort:
https://github.com/SemiAnalysisAI/FuzzX/tree/master/x86 :
x86/bugs/014-resetfpenv-mmo-flagged-as-store-on-load

cc @jlebar



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