Fix "Combine bit test + conditional or into simple math"
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 30 Apr 2013 08:57:58 +0000 (08:57 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 30 Apr 2013 08:57:58 +0000 (08:57 +0000)
commitdefce4cfd607e013169033164def7a3e558bfd54
tree0275207a46885d917030e2e4a33ad4d5e4c2d682
parent8838410a75784c9ab248b652d450e2f872caa994
Fix "Combine bit test + conditional or into simple math"

This fixes the optimization introduced in r179748 and reverted in r179750.

While the optimization was sound, it did not properly respect differences in
bit-width.

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