This is an archive of the discontinued LLVM Phabricator instance.

IRBuilder: Fix not handling strictfp minnum/maxnum
ClosedPublic

Authored by arsenm on Jul 11 2023, 11:28 AM.

Details

Summary

Removing the rounding mode arguments seems like more trouble than
it's worth. minimum and maximum are still broken.

Diff Detail

Event Timeline

arsenm created this revision.Jul 11 2023, 11:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2023, 11:28 AM
arsenm requested review of this revision.Jul 11 2023, 11:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2023, 11:28 AM
Herald added a subscriber: wdng. · View Herald Transcript
kpn accepted this revision.Jul 11 2023, 11:40 AM

LGTM.

This revision is now accepted and ready to land.Jul 11 2023, 11:40 AM

Removing the rounding mode arguments seems like more trouble than
it's worth.

Change looks fine, but I don't understand what you mean by this commit messsage.

Removing the rounding mode arguments seems like more trouble than
it's worth.

Change looks fine, but I don't understand what you mean by this commit messsage.

The signature of the constrained minnum/maxnum intrinsics is different from other binary operators simply because it doesn't read the rounding mode. It would be easier and could reuse the existing binary operator function if it had the unused operand

dyung added a subscriber: dyung.Jul 11 2023, 4:34 PM

@arsenm Not sure if you noticed it, but your change appears to have caused a test failure in clang/test/CodeGen/strictfp-elementwise-bulitins.cpp which might have been masked by a previously existing test failure on the same bot. Can you take a look?

https://lab.llvm.org/buildbot/#/builders/139/builds/44853

Hey, I didn't realize that there was already a fix for the broken tests fd2254b and reverted this. After I realized, I reverted the revert in https://github.com/llvm/llvm-project/commit/c256e1967151c0a221a6bb63b5e4f15a35b0cecd, so it should be all good after that. Sorry about that!