Folding into CSEL when there is ZEXT between SETCC and ADD
authorWeiming Zhao <weimingz@codeaurora.org>
Tue, 13 May 2014 00:40:58 +0000 (00:40 +0000)
committerWeiming Zhao <weimingz@codeaurora.org>
Tue, 13 May 2014 00:40:58 +0000 (00:40 +0000)
commit0449d522a66512af6e7b999d46445c7f7e4b8536
treea13fa03ee781ae3062773d6ea6fc7aaa9188cb0f
parent5204fedd35f17c093dcdc90b759b416aaa7fa977
Folding into CSEL when there is ZEXT between SETCC and ADD

Normally, patterns like (add x, (setcc cc ...)) will be folded into
(csel x, x+1, not cc). However, if there is a ZEXT after SETCC, they
won't be folded. This patch recognizes the ZEXT and allows the
generation of CSINC.

This patch fixes bug 19680.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208660 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM64/ARM64ISelLowering.cpp
test/CodeGen/ARM64/csel.ll