Tag build swift-2.2-SNAPSHOT-2016-01-25-a
X86ISelLowering: Fix cmov(cmov) special lowering bug

There's a special case in EmitLoweredSelect() that produces an improved
lowering for cmov(cmov) patterns. However this special lowering is
currently broken if the inner cmov has multiple users so this patch
stops using it in this case.

If you wonder why this wasn't fixed by continuing to use the special
lowering and inserting a 2nd PHI for the inner cmov: I believe this
would incur additional copies/register pressure so the special lowering
does not improve upon the normal one anymore in this case.

This fixes http://llvm.org/PR26256 (= rdar://24329747)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258729 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed