diff options
| author | Hans Wennborg <hans@hanshq.net> | 2015-12-15 23:21:46 +0000 |
|---|---|---|
| committer | Hans Wennborg <hans@hanshq.net> | 2015-12-15 23:21:46 +0000 |
| commit | 7036e503d73ce3e4f69f6f7fa81efabeda00fd37 (patch) | |
| tree | d935df82705958f7b4bf7f19b6eb2e13f60cd0bb | |
| parent | 7750f4ed9e223394cc6a552c9129f619b1ed3bb2 (diff) | |
| download | bcm5719-llvm-7036e503d73ce3e4f69f6f7fa81efabeda00fd37.tar.gz bcm5719-llvm-7036e503d73ce3e4f69f6f7fa81efabeda00fd37.zip | |
Fix "Not having LAHF/SAHF" assert.
It wants to assert that the subtarget is 64-bit, not the register.
llvm-svn: 255703
| -rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp index 7f0766df26f..e028683c63b 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.cpp +++ b/llvm/lib/Target/X86/X86InstrInfo.cpp @@ -4417,7 +4417,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. |

