[llvm-bugs] [Bug 34454] New: [X86] Failure to prevent schedule across x87 control word instructions
llvm-bugs at lists.llvm.org
Mon Sep 4 05:35:11 PDT 2017
Bug ID: 34454
Summary: [X86] Failure to prevent schedule across x87 control
OS: Windows NT
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: llvm-dev at redking.me.uk
CC: craig.topper at gmail.com, emaste at freebsd.org,
gadi.haber at intel.com, llvm-bugs at lists.llvm.org,
spatel+llvm at rotateright.com
Branched off from [Bug #34080].
The partial SandyBridge schedule model (which is used for all default x86-64
targets) resulted in the scheduler moving some instructions across fldcw/fnstcw
instructions, affecting rounding of truncated stores etc.
The issue appears to be that we're incorrectly handling the control word
register dependency, which is odd because it looks like fldcw/fnstcw are
correctly flagged to cause side effects.
It could also be a chain issue in the fptosi store code in
X86TargetLowering::EmitInstrWithCustomInserter but I didn't notice anything.
Exposing this is tricky, and seems to involve applying rL307529 but not
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs