]> granicus.if.org Git - llvm/commit
[DAGCombiner] Do not generate ISD::ADDE node if adde is not legal for the target...
authorZi Xuan Wu <wuzish@cn.ibm.com>
Tue, 30 Apr 2019 03:01:14 +0000 (03:01 +0000)
committerZi Xuan Wu <wuzish@cn.ibm.com>
Tue, 30 Apr 2019 03:01:14 +0000 (03:01 +0000)
commit392c1020bc6bfbabe2853382e00f3c2f22f9b08d
tree2431956347a192b99d01b1d7bf1bfba73249b27a
parentf235e145c916630625363602d12b67f15b279482
[DAGCombiner] Do not generate ISD::ADDE node if adde is not legal for the target when combine ISD::TRUNC node

Do not combine (trunc adde(X, Y, Carry)) into (adde trunc(X), trunc(Y), Carry),
if adde is not legal for the target. Even it's at type-legalize phase.
Because adde is special and will not be legalized at operation-legalize phase later.

This fixes: PR40922
https://bugs.llvm.org/show_bug.cgi?id=40922

Differential Revision: https://reviews.llvm.org//D60854

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359532 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/PowerPC/pr39815.ll
test/CodeGen/PowerPC/pr40922.ll [new file with mode: 0644]