[PATCH] D25485: [x86] use 'neg' for negation of bool
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 13 10:43:19 PDT 2016
spatel added a comment.
In https://reviews.llvm.org/D25485#569404, @spatel wrote:
> Looking closer at the SystemZ regression test differences, we have more instructions with the LegalizeDAG patch, so I think that target is missing a pattern ( cc'ing @uweigand and @jonpa ).
On 2nd thought, this is a missing combine for all targets:
define i32 @topbit(i32 %x) {
%sra = ashr i32 %x, 31
%neg = sub i32 0, %sra
ret i32 %neg
}
Should be simplified to:
%neg = lshr i32 %x, 31
https://reviews.llvm.org/D25485
More information about the llvm-commits
mailing list