HomePhabricator

InstCombine: Combine select sequences into a single select

Authored by MatzeB on Feb 6 2015, 9:49 AM.

Description

InstCombine: Combine select sequences into a single select

Normalize
select(C0, select(C1, a, b), b) -> select((C0 & C1), a, b)
select(C0, a, select(C1, a, b)) -> select((C0 | C1), a, b)

This normal form may enable further combines on the And/Or and shortens
paths for the values. Many targets prefer the other but can go back
easily in CodeGen.

Differential Revision: http://reviews.llvm.org/D7399

llvm-svn: 228409

Details

Committed
MatzeBFeb 6 2015, 9:49 AM
Differential Revision
D7399: CodeGenPrepare: Avoid and/or i1 in select conditions.
Parents
rG123f44a2f6c3: unwind: use -fno-rtti -fno-exceptions -funwind-tables
Branches
Unknown
Tags
Unknown