[PATCH] D112283: [Instcombine] Try to get select's FMFs from its operands

Usman Nadeem via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 21 17:06:10 PDT 2021


mnadeem created this revision.
mnadeem added a reviewer: spatel.
Herald added subscribers: dexonsmith, hiraditya.
mnadeem requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This tries to tackle https://bugs.llvm.org/show_bug.cgi?id=52259

Intersect the FMF of the select's operands. If the operand is not a `FPMathOperator` e.g. an argument then try to take the flag from the function's attributes.


https://reviews.llvm.org/D112283

Files:
  llvm/include/llvm/IR/Operator.h
  llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
  llvm/test/Transforms/InstCombine/minmax-fold.ll
  llvm/test/Transforms/PhaseOrdering/fmf-select-abs.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112283.381435.patch
Type: text/x-patch
Size: 5985 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211022/6194bb15/attachment.bin>


More information about the llvm-commits mailing list