[all-commits] [llvm/llvm-project] ce9520: [InstSimplify] propagate poison through FP ops

RotateRight via All-commits all-commits at lists.llvm.org
Wed Jun 16 08:33:47 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ce95200b7942bb0683fd491800bbd9e1dc908e04
      https://github.com/llvm/llvm-project/commit/ce95200b7942bb0683fd491800bbd9e1dc908e04
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-06-16 (Wed, 16 Jun 2021)

  Changed paths:
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/test/Transforms/InstSimplify/call.ll
    M llvm/test/Transforms/InstSimplify/fp-undef-poison.ll

  Log Message:
  -----------
  [InstSimplify] propagate poison through FP ops

We already have this fold:
  fadd float poison, 1.0 --> poison
...via ConstantFolding, so this makes the behavior consistent
if the other operand(s) are non-constant.

The fold for undef was added before poison existed as a
value/type in IR.

This came up in D102673 / D103169
because we're trying to sort out the more complicated handling
for constrained math ops.
We should have the handling for the regular instructions done
first, so we can build on that (or diverge as needed).

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




More information about the All-commits mailing list