HomePhabricator

[ConstantFolding] add undef handling for fmin/fmax intrinsics

Authored by spatel on Sep 18 2020, 1:37 PM.

Description

[ConstantFolding] add undef handling for fmin/fmax intrinsics

The output here may not be optimal (yet), but it should be
consistent for commuted operands (it was not before) and
correct. We can do better by checking FMF and NaN if needed.

Code in InstSimplify generally assumes that we have already
folded code like this, so it was not handling 2 constant
inputs by commuting consistently.

Details

Committed
spatelSep 19 2020, 7:31 AM
Parents
rGd4dd96130058: Fixes complexity of map insert_or_assign with a hint.
Branches
Unknown
Tags
Unknown