This is an archive of the discontinued LLVM Phabricator instance.

[ConstantFolding] Pre-commit tests showing denormal handling during folding
ClosedPublic

Authored by dcandler on May 17 2022, 9:45 AM.

Details

Summary

These tests demonstrate cases where the constant produced by folding
a floating point instruction should differ based on the denormal
handling mode set in function attributes.

Diff Detail

Event Timeline

dcandler created this revision.May 17 2022, 9:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 17 2022, 9:45 AM
dcandler requested review of this revision.May 17 2022, 9:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 17 2022, 9:45 AM
spatel accepted this revision.Jun 17 2022, 6:24 AM

LGTM

This revision is now accepted and ready to land.Jun 17 2022, 6:24 AM
This revision was landed with ongoing or failed builds.Jun 20 2022, 7:38 AM
This revision was automatically updated to reflect the committed changes.

I'm not sure what is the right protocol for adding review comments to a long-submitted patch.
But, whilst thinking of adding float16 tests, I noticed 4 possible inconsistencies in float32 tests.

llvm/test/Transforms/InstSimplify/constant-fold-fp-denormal.ll
561

Should #0 be #1? otherwise this test is identical to the previous test, including having the same attributes

568
575
582

I'm not sure what is the right protocol for adding review comments to a long-submitted patch.
But, whilst thinking of adding float16 tests, I noticed 4 possible inconsistencies in float32 tests.

Yes, I remember spotting this as well. It seems I did include corrections for them in https://reviews.llvm.org/D129298 but that was ultimately abandoned.