This is an archive of the discontinued LLVM Phabricator instance.

[Legalizer] Don't throw away false low half for GT/LT SETCC
ClosedPublic

Authored by mkuper on Sep 1 2016, 12:32 PM.

Details

Summary

When expanding a SETCC for which the low half is known to evaluate to false, we can only throw it away for LT/GT comparisons, not LE/GE.

This fixes PR29170.

Diff Detail

Repository
rL LLVM

Event Timeline

mkuper updated this revision to Diff 70050.Sep 1 2016, 12:32 PM
mkuper retitled this revision from to [Legalizer] Don't throw away false low half for GT/LT SETCC.
mkuper updated this object.
mkuper added reviewers: spatel, majnemer.
mkuper added a subscriber: llvm-commits.
spatel accepted this revision.Sep 1 2016, 2:23 PM
spatel edited edge metadata.

LGTM - but there's a bug in the regression test that needs to be fixed.

test/CodeGen/X86/pr29170.ll
10 ↗(On Diff #70050)

'CHECL' - use utils/update_test_checks.py to avoid human error? :)

This revision is now accepted and ready to land.Sep 1 2016, 2:23 PM
mkuper added inline comments.Sep 1 2016, 2:27 PM
test/CodeGen/X86/pr29170.ll
10 ↗(On Diff #70050)

Yikes, thanks!
(I intentionally didn't use update_test_checks, since I wanted a fairly "loose" test. But should have double checked the checks!)

This revision was automatically updated to reflect the committed changes.