This is an archive of the discontinued LLVM Phabricator instance.

[NFC] Change isFPPredicate comparison to ignore lower bound
ClosedPublic

Authored by dstuttard on Jul 10 2020, 1:53 AM.

Details

Summary

Since changing the Predicate to be an unsigned enum, the lower bound check for
isFPPredicate no longer needs to check the lower bound, since
it will always evaluate to true.

Also fixed a similar issue in SIISelLowering.cpp by removing the need for
comparing to FIRST and LAST predicates

Added an assert to the isFPPredicate comparison to flag if the
FIRST_FCMP_PREDICATE is ever changed to anything other than 0, in which case the
logic will break.

Without this change warnings are generated in VS.

Change-Id: I358f0daf28c0628c7bda8ad4cab4e1757b761bab

Diff Detail

Event Timeline

dstuttard created this revision.Jul 10 2020, 1:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 10 2020, 1:53 AM

D81662 started causing warnings for VS. This fixes those.

This revision is now accepted and ready to land.Jul 10 2020, 2:04 AM
This revision was automatically updated to reflect the committed changes.