[DAGCombiner] Fix PR25763 - vector comparison constant folding + sign-extension
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 10 Dec 2015 19:47:06 +0000 (19:47 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 10 Dec 2015 19:47:06 +0000 (19:47 +0000)
commit45d4194e91032db8ea6db1a98460ef74e2cd6f2b
tree39778f470cf7c52df1610833f0d6f604540e1d56
parent7d33195bda000e2af510fbc2ead504bcebaf7e97
[DAGCombiner] Fix PR25763 - vector comparison constant folding + sign-extension

PR25763 demonstrated an issue with D14683 - vector comparison constant folding only works for i1 results, so we need to split off the sign-extension of the result to the required type. Luckily this can be done with the existing type legalization code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255289 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
test/CodeGen/AArch64/fold-constants.ll