]> granicus.if.org Git - llvm/commit
[FPEnv] Lower STRICT_FP_EXTEND and STRICT_FP_ROUND nodes in preprocess phase of ISelL...
authorKevin P. Neal <kevin.neal@sas.com>
Fri, 14 Jun 2019 16:28:55 +0000 (16:28 +0000)
committerKevin P. Neal <kevin.neal@sas.com>
Fri, 14 Jun 2019 16:28:55 +0000 (16:28 +0000)
commit17367c1757a8dc20c5d7064fa6e617130e63c447
treebc066062aa3928d6f531a53036c1ffcbd2a74346
parent4986823014631afeeaab3069a35817c28d17f5ef
[FPEnv] Lower STRICT_FP_EXTEND and STRICT_FP_ROUND nodes in preprocess phase of ISelLowering to mirror non-strict nodes on x86.

I recently discovered a bug on the x86 platform: The fp80 type was not handled well by x86 for constrained floating point nodes, as their regular counterparts are replaced by extending loads and truncating stores during the preprocess phase. Normally, platforms don't have this issue, as they don't typically attempt to perform such legalizations during instruction selection preprocessing. Before this change, strict_fp nodes survived until they were mutated to normal nodes, which happened shortly after preprocessing on other platforms. This modification lowers these nodes at the same phase while properly utilizing the chain.5

Submitted by: Drew Wock <drew.wock@sas.com>
Reviewed by: Craig Topper, Kevin P. Neal
Approved by: Craig Topper
Differential Revision: https://reviews.llvm.org/D63271

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363417 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelDAGToDAG.cpp
test/CodeGen/X86/constrained-fp80-trunc-ext.ll [new file with mode: 0644]