Skip to content

Commit 41a1792

Browse files
committedFeb 8, 2019
[X86] Remove isReMaterializable from X87 floating point constant loads and constant pool loads.
Summary: These instructions update FPSW so they aren't generically safe to rematerialize into any location if FPSW is live for a comparison result. They also use FPCW for exception masking control. Though the only exception they can generate is stack overflow and we manage the stack ourselves so that's not really going to occur. Reviewers: RKSimon, spatel Reviewed By: RKSimon Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57934 llvm-svn: 353536
1 parent 6bfd721 commit 41a1792

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed
 

Diff for: ‎llvm/lib/Target/X86/X86InstrFPStack.td

+2-3
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,7 @@ let SchedRW = [WriteLoad] in {
421421
let canFoldAsLoad = 1 in {
422422
def LD_Fp32m : FpIf32<(outs RFP32:$dst), (ins f32mem:$src), ZeroArgFP,
423423
[(set RFP32:$dst, (loadf32 addr:$src))]>;
424-
let isReMaterializable = 1 in
425-
def LD_Fp64m : FpIf64<(outs RFP64:$dst), (ins f64mem:$src), ZeroArgFP,
424+
def LD_Fp64m : FpIf64<(outs RFP64:$dst), (ins f64mem:$src), ZeroArgFP,
426425
[(set RFP64:$dst, (loadf64 addr:$src))]>;
427426
def LD_Fp80m : FpI_<(outs RFP80:$dst), (ins f80mem:$src), ZeroArgFP,
428427
[(set RFP80:$dst, (loadf80 addr:$src))]>;
@@ -548,7 +547,7 @@ def XCH_F : FPI<0xD9, MRM1r, (outs), (ins RSTi:$op), "fxch\t$op">;
548547
}
549548

550549
// Floating point constant loads.
551-
let isReMaterializable = 1, SchedRW = [WriteZero] in {
550+
let SchedRW = [WriteZero] in {
552551
def LD_Fp032 : FpIf32<(outs RFP32:$dst), (ins), ZeroArgFP,
553552
[(set RFP32:$dst, fpimm0)]>;
554553
def LD_Fp132 : FpIf32<(outs RFP32:$dst), (ins), ZeroArgFP,

Diff for: ‎llvm/lib/Target/X86/X86InstrInfo.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,6 @@ bool X86InstrInfo::isReallyTriviallyReMaterializable(const MachineInstr &MI,
482482
case X86::MOV16rm:
483483
case X86::MOV32rm:
484484
case X86::MOV64rm:
485-
case X86::LD_Fp64m:
486485
case X86::MOVSSrm:
487486
case X86::MOVSDrm:
488487
case X86::MOVAPSrm:

0 commit comments

Comments
 (0)
Please sign in to comment.