Page MenuHomePhabricator

[FPEnv] Make constrained FP IR verification more flexible.
ClosedPublic

Authored by kpn on Mar 26 2019, 11:33 AM.

Details

Summary

The IR verifier currently supports the constrained floating point intrinsics, but the implementation is hard to extend. It doesn't currently have an easy way to support intrinsics that, for example, lack a rounding mode. This will be needed for impending new constrained intrinsics.

This code is split out of D55897, which itself was split out of D43515.

Diff Detail

Repository
rL LLVM

Event Timeline

kpn created this revision.Mar 26 2019, 11:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 26 2019, 11:33 AM
arsenm accepted this revision.Mar 26 2019, 11:38 AM
arsenm added a subscriber: arsenm.

LGTM

This revision is now accepted and ready to land.Mar 26 2019, 11:38 AM
arsenm requested changes to this revision.Mar 26 2019, 11:38 AM

Actually, needs tests

This revision now requires changes to proceed.Mar 26 2019, 11:38 AM
kpn added a comment.Mar 26 2019, 11:43 AM

No new observable behavior change is introduced by this patch. I believe the existing constrained intrinsic tests should exercise it pretty well. Is there a specific test that is needed?

In D59830#1443346, @kpn wrote:

No new observable behavior change is introduced by this patch. I believe the existing constrained intrinsic tests should exercise it pretty well. Is there a specific test that is needed?

I grepped around and don't see these error messages in any verifier tests, so it seems like this isn't actually tested now

In D59830#1443346, @kpn wrote:

No new observable behavior change is introduced by this patch. I believe the existing constrained intrinsic tests should exercise it pretty well. Is there a specific test that is needed?

I grepped around and don't see these error messages in any verifier tests, so it seems like this isn't actually tested now

At least 2 of these cases are missing tests: https://llvm.org/reports/coverage/lib/IR/Verifier.cpp.gcov.html

kpn updated this revision to Diff 192325.Mar 26 2019, 12:32 PM

Remove some unneeded, untested code and add a comment on why it is unneeded.

arsenm accepted this revision.Mar 26 2019, 1:52 PM

LGTM

This revision is now accepted and ready to land.Mar 26 2019, 1:52 PM
This revision was automatically updated to reflect the committed changes.