HomePhabricator

[DAGCombiner] fold sext into negation

Authored by spatel on Mar 28 2019, 8:46 AM.

Description

[DAGCombiner] fold sext into negation

As noted in D59818:

%z = zext i8 %x to i32
%neg = sub i32 0, %z
%r = sext i32 %neg to i64
=>
%z2 = zext i8 %x to i64
%r = sub i64 0, %z2

https://rise4fun.com/Alive/KzSR

llvm-svn: 357178

Details

Committed
spatelMar 28 2019, 8:46 AM
Parents
rGe7815282786a: [x86] add vector test for sext of negate; NFC
Branches
Unknown
Tags
Unknown