[PATCH] D15240: X86: Don't emit SAHF/LAHF for 64-bit targets unless explicitly supported
JF Bastien via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 4 14:51:30 PST 2015
jfb accepted this revision.
jfb added a comment.
This revision is now accepted and ready to land.
Sorry, a few more comments. lgtm otherwise.
================
Comment at: lib/Target/X86/X86.td:564
@@ -549,3 +563,3 @@
FeatureCMPXCHG16B, FeatureLZCNT, FeaturePOPCNT,
FeatureSlowBTMem, FeatureSlowSHLD]>;
----------------
Looks like the above two should also have lahf/sahf.
================
Comment at: lib/Target/X86/X86InstrInfo.cpp:4398
@@ +4397,3 @@
+ if (!Subtarget.hasLAHFSAHF()) {
+ // Moving EFLAGS to / from another register requires a push and a pop.
+ // Notice that we have to adjust the stack if we don't want to clobber the
----------------
IIUC you can `assert(is64);` here?
http://reviews.llvm.org/D15240
More information about the llvm-commits
mailing list