This is an archive of the discontinued LLVM Phabricator instance.

Check source value precision when reducing cast intrinsic
ClosedPublic

Authored by arsenm on Mar 17 2017, 4:07 PM.

Details

Reviewers
hfinkel
Summary

Missed this check when porting from the libcall version.

Diff Detail

Event Timeline

arsenm created this revision.Mar 17 2017, 4:07 PM
hfinkel accepted this revision.Mar 20 2017, 3:51 AM

LGTM.

lib/Transforms/InstCombine/InstCombineCasts.cpp
1449

It would help to have a comment here, maybe something like:

// Except for fabs, this transformation requires the input of the unary FP operation to be itself an fpext from the type to which we're truncating.

This revision is now accepted and ready to land.Mar 20 2017, 3:51 AM
arsenm closed this revision.Mar 20 2017, 3:12 PM

r298312