OSDN Git Service

[InstCombine] handle icmp i1 X, C early to avoid creating an unknown pattern
authorSanjay Patel <spatel@rotateright.com>
Wed, 17 May 2017 22:29:40 +0000 (22:29 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 17 May 2017 22:29:40 +0000 (22:29 +0000)
commitb5ad2b6b0b31a1af5ca24bca415227c74a72f278
tree1615efff59c65d4d30cd60083df3d4bf20654499
parent9292b008db0b0002fdca06d33b0e7cc51b1e1503
[InstCombine] handle icmp i1 X, C early to avoid creating an unknown pattern

The missing optimization for xor-of-icmps still needs to be added, but by
being more efficient (not generating unnecessary logic ops with constants)
we avoid the bug.

See discussion in post-commit comments:
https://reviews.llvm.org/D32143

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303312 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCompares.cpp
test/Transforms/InstCombine/set.ll