OSDN Git Service

[InstCombine] prefer xor with -1 because 'not' is easier to understand (PR32706)
authorSanjay Patel <spatel@rotateright.com>
Fri, 21 Apr 2017 14:03:54 +0000 (14:03 +0000)
committerSanjay Patel <spatel@rotateright.com>
Fri, 21 Apr 2017 14:03:54 +0000 (14:03 +0000)
commitbd1b03d467c2a5f96ccf612d9ae1c31a02a654ea
tree8d57b2644b1907897688b6de89e3ebe357f27115
parentf9f7441f9caad032d41f9e9725ba218615e1cf95
[InstCombine] prefer xor with -1 because 'not' is easier to understand (PR32706)

This matches the demanded bits behavior in the DAG and should fix:
https://bugs.llvm.org/show_bug.cgi?id=32706

Differential Revision: https://reviews.llvm.org/D32255

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300977 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
test/Transforms/InstCombine/xor.ll
test/Transforms/InstCombine/zext.ll