Skip to content

Commit

Permalink
Fix "Not having LAHF/SAHF" assert.
Browse files Browse the repository at this point in the history
It wants to assert that the subtarget is 64-bit, not the register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255703 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
zmodem authored and AndyAyersMS committed Dec 15, 2015
1 parent 587a26f commit 1862332
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Target/X86/X86InstrInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4401,7 +4401,8 @@ void X86InstrInfo::copyPhysReg(MachineBasicBlock &MBB,
int AX = is64 ? X86::RAX : X86::EAX;

if (!Subtarget.hasLAHFSAHF()) {
assert(is64 && "Not having LAHF/SAHF only happens on 64-bit.");
assert(Subtarget.is64Bit() &&
"Not having LAHF/SAHF only happens on 64-bit.");
// 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
// first frame index. See X86FrameLowering.cpp - clobbersTheStack.
Expand Down

0 comments on commit 1862332

Please sign in to comment.