HomePhabricator

[instcombine] icmp eq/ne (sub C, Y), C -> icmp eq/ne Y, 0

Authored by reames on Wed, Aug 21, 8:51 AM.

Description

[instcombine] icmp eq/ne (sub C, Y), C -> icmp eq/ne Y, 0

Noticed while looking at pr43028.

llvm-svn: 369541

Details

Committed
reamesWed, Aug 21, 8:51 AM
Parents
rGf64918d092c0: clang: Fix typo in comment
Branches
Unknown
Tags
Unknown

Event Timeline

No review ? No alive proof ?

Tests with edge values (i8 min, i8 max)?

@spatel @lebedev.ri

If it is sound and valid, I have no problem, no need to revert :)

Can you please add a vector test?

Thanks for added tests.