Page MenuHomePhabricator

[InstCombine] Support BitTests in ThreeWayComparison. Mismatched types
AbandonedPublic

Authored by mkazantsev on Apr 19 2018, 10:21 PM.

Details

Summary

In this patch we continue supporting BitTests of the highest bit in the ThreeWayComparison
matcher in the InstCombine (see problem's description in the message of D45854).

This patch adds support for the transform of

%c2 = icmp slt i64 %a, 0
%select1 = select i1 %c2, i32 %Less, i32 %Greater

to

(trunc (%a s>> 64) to i32) - (%Less - %Greater) + %Greater

Diff Detail

Event Timeline

Formatted tests.

mkazantsev planned changes to this revision.Apr 23 2018, 10:28 PM

We will try another approach to deal with the problem, see discussion in review of D45862.

mkazantsev requested review of this revision.Apr 27 2018, 7:44 PM
mkazantsev abandoned this revision.May 2 2018, 6:44 PM

Abandoning in favour of D46086