This is an archive of the discontinued LLVM Phabricator instance.

Remove always-true comparison, NFC.
ClosedPublic

Authored by filcab on Jul 2 2015, 10:05 PM.

Details

Summary

Looking at r241279, I noticed that UpgradedIntrinsics only gets written
to in the following code:

if (UpgradeIntrinsicFunction(&F, NewFn))
  UpgradedIntrinsics[&F] = NewFn;

Looking through UpgradeIntrinsicFunction, we always return false OR
NewFn will be set to a different function from our source.

This patch pulls the F != NewFn into UpgradeIntrinsicFunction as an
assert, and removes the check from callers of UpgradeIntrinsicFunction.

Diff Detail

Repository
rL LLVM

Event Timeline

filcab updated this revision to Diff 28991.Jul 2 2015, 10:05 PM
filcab retitled this revision from to Remove always-true comparison, NFC..
filcab updated this object.
filcab added reviewers: rafael, chandlerc.
filcab added a subscriber: llvm-commits.
rafael accepted this revision.Jul 3 2015, 5:06 AM
rafael edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jul 3 2015, 5:06 AM
This revision was automatically updated to reflect the committed changes.