Index: llvm/lib/Target/X86/X86RegisterInfo.cpp =================================================================== --- llvm/lib/Target/X86/X86RegisterInfo.cpp +++ llvm/lib/Target/X86/X86RegisterInfo.cpp @@ -523,6 +523,9 @@ // Set the floating point control register as reserved. Reserved.set(X86::FPCW); + // Set the floating point status register as reserved. + Reserved.set(X86::FPSW); + // Set the SIMD floating point control register as reserved. Reserved.set(X86::MXCSR); Index: llvm/test/CodeGen/X86/pr34080-2.ll =================================================================== --- llvm/test/CodeGen/X86/pr34080-2.ll +++ llvm/test/CodeGen/X86/pr34080-2.ll @@ -62,13 +62,13 @@ ; CHECK-NEXT: imull $60000, 24(%ebx), %ecx # imm = 0xEA60 ; CHECK-NEXT: addl %eax, %ecx ; CHECK-NEXT: fldl 28(%ebx) +; CHECK-NEXT: fmuls {{\.LCPI.*}} ; CHECK-NEXT: fnstcw {{[0-9]+}}(%esp) ; CHECK-NEXT: movzwl {{[0-9]+}}(%esp), %eax ; CHECK-NEXT: orl $3072, %eax # imm = 0xC00 ; CHECK-NEXT: movw %ax, {{[0-9]+}}(%esp) ; CHECK-NEXT: movl %ecx, %eax ; CHECK-NEXT: sarl $31, %eax -; CHECK-NEXT: fmuls {{\.LCPI.*}} ; CHECK-NEXT: fldcw {{[0-9]+}}(%esp) ; CHECK-NEXT: fistpll {{[0-9]+}}(%esp) ; CHECK-NEXT: fldcw {{[0-9]+}}(%esp)