The DAGCombiner was threading select over pairs of extending loads even
authorDuncan Sands <baldrick@free.fr>
Thu, 18 Nov 2010 20:05:18 +0000 (20:05 +0000)
committerDuncan Sands <baldrick@free.fr>
Thu, 18 Nov 2010 20:05:18 +0000 (20:05 +0000)
commitdcfd3a798ffbd5e02d4892eeef562c9124598844
tree7a9a91a019d76abf51392d3906a62b7a3ec74922
parentd0c6f3dafd7c3e9137d4e6415014c94137fcd3fc
The DAGCombiner was threading select over pairs of extending loads even
if the extension types were not the same.  The result was that if you
fed a select with sext and zext loads, as in the testcase, then it
would get turned into a zext (or sext) of the select, which is wrong
in the cases when it should have been an sext (resp. zext).  Reported
and diagnosed by Sebastien Deldon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119728 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/2010-11-18-SelectOfExtload.ll [new file with mode: 0644]