[PATCH] D80943: [X86] Add a flag to guard the wide load
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 1 12:25:54 PDT 2020
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/X86/X86InstrInfo.td:1135
return true;
- if (ExtType == ISD::EXTLOAD)
+ if (ExtType == ISD::EXTLOAD && Subtarget->enableWideLoad())
return LD->getAlignment() >= 4 && LD->isSimple();
----------------
Why not do this in loadi16 as well?
================
Comment at: llvm/lib/Target/X86/X86Subtarget.cpp:48
+static cl::opt<bool> EnableWideLoad("x86-enalbe-wide-load", cl::init(true),
+ cl::desc("If load an 8b or 16b value from 32b aligned address, and any "
----------------
Can we put this in X86ISelDAGToDAG.cpp and access it directly? The .td should generate an include that gets included there.
================
Comment at: llvm/lib/Target/X86/X86Subtarget.cpp:48
+static cl::opt<bool> EnableWideLoad("x86-enalbe-wide-load", cl::init(true),
+ cl::desc("If load an 8b or 16b value from 32b aligned address, and any "
----------------
craig.topper wrote:
> Can we put this in X86ISelDAGToDAG.cpp and access it directly? The .td should generate an include that gets included there.
enalbe->enable
x86-promote-anyext-load might be a better name? "wide" might get mixed up with vectors since we have WidenVector as a type legalization action.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80943/new/
https://reviews.llvm.org/D80943
More information about the llvm-commits
mailing list