This is an archive of the discontinued LLVM Phabricator instance.

Exclude bitcast and ext/trunc signbit optimization on ppc_fp128
ClosedPublic

Authored by echristo on Apr 10 2020, 3:33 PM.

Details

Summary

Revision a1c05fe removed bitcast from the list of problematic transformations, however:

%97 = fptrunc ppc_fp128 %2 to double            // we need to check ppc_fp128 here to prevent the transformation
%98 = bitcast double %97 to i64                 // a1c05fe checks ppc_fp128 at here
%99 = icmp slt i64 %98, 0
%100 = zext i1 %99 to i8
store i8 %100, i8* %7, align 1

so this patch does that. I'm also disabling it in the presence of extend just in case.

I verified separately that the hash of -std::infinity and std::infinity don't match now.

Diff Detail

Event Timeline

echristo created this revision.Apr 10 2020, 3:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 10 2020, 3:33 PM
echristo retitled this revision from Exclude bitcast and ext/trunc on ppc_fp128 to Exclude bitcast and ext/trunc signbit optimization on ppc_fp128 .Apr 10 2020, 3:35 PM
Carrot accepted this revision.Apr 10 2020, 4:18 PM
This revision is now accepted and ready to land.Apr 10 2020, 4:18 PM
spatel accepted this revision.Apr 10 2020, 4:41 PM

LGTM. I had convinced myself that the problem was only the fpext variant, but that’s clearly wrong.

This revision was automatically updated to reflect the committed changes.