[PATCH] D143106: [SDAG] fix miscompiles caused by using ValueTracking matchSelectPattern to create FMINIMUM/FMAXIMUM

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 07:55:01 PST 2023


spatel added a comment.

In D143106#4099017 <https://reviews.llvm.org/D143106#4099017>, @samparker wrote:

> So, for the targets that would return the input NaN, do you think it would be worth implementing a target API for ValueTracking so that it could make a decision, or is this something that have to be sunk into the DAGBuilder?

Can't rule out transforms/analysis in IR...but currently, it doesn't look good. It seems more likely that we would defer to codegen (DAGCombiner or target-specific isel).

> Are there any other uses of matchSelectPattern that could also be making a bogus decision?

I did an audit of trunk LLVM for SPF_MINNUM and related API, and this looks like the only potential misuse.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143106/new/

https://reviews.llvm.org/D143106



More information about the llvm-commits mailing list