[all-commits] [llvm/llvm-project] 04a869: [FPEnv] Fix chain handling for fpexcept.strict nodes

Ulrich Weigand via All-commits all-commits at lists.llvm.org
Mon Jan 13 05:39:24 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 04a86966fbf46809d7a165b1f089e4d076f0f8a5
      https://github.com/llvm/llvm-project/commit/04a86966fbf46809d7a165b1f089e4d076f0f8a5
  Author: Ulrich Weigand <ulrich.weigand at de.ibm.com>
  Date:   2020-01-13 (Mon, 13 Jan 2020)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
    M llvm/test/CodeGen/PowerPC/ppcf128-constrained-fp-intrinsics.ll
    M llvm/test/CodeGen/SystemZ/fp-strict-alias.ll
    M llvm/test/CodeGen/SystemZ/vector-constrained-fp-intrinsics.ll
    M llvm/test/CodeGen/X86/fp-intrinsics.ll
    M llvm/test/CodeGen/X86/fp128-cast-strict.ll
    M llvm/test/CodeGen/X86/fp128-libcalls-strict.ll
    M llvm/test/CodeGen/X86/vector-constrained-fp-intrinsics-flags.ll
    M llvm/test/CodeGen/X86/vector-constrained-fp-intrinsics.ll

  Log Message:
  -----------
  [FPEnv] Fix chain handling for fpexcept.strict nodes

We need to ensure that fpexcept.strict nodes are not optimized away even if
the result is unused. To do that, we need to chain them into the block's
terminator nodes, like already done for PendingExcepts.

This patch adds two new lists of pending chains, PendingConstrainedFP and
PendingConstrainedFPStrict to hold constrained FP intrinsic nodes without
and with fpexcept.strict markers. This allows not only to solve the above
problem, but also to relax chains a bit further by no longer flushing all
FP nodes before a store or other memory access. (They are still flushed
before nodes with other side effects.)

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D72341




More information about the All-commits mailing list