TRUNCATE constant folding - minor fix for rL233224
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 16 Apr 2015 08:21:09 +0000 (08:21 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 16 Apr 2015 08:21:09 +0000 (08:21 +0000)
commitc7bcb37fd3a16d27753360f69ace0511501fa903
treee62dcfef19316addc6d1bd09b08b34058da01b32
parent6b907009177a6d5ef705bcc1614709279dd0762a
TRUNCATE constant folding - minor fix for rL233224

Fix for test case found by James Molloy - TRUNCATE of constant build vectors can be more simply achieved by simply replacing with a new build vector node with the truncated value type - no need to touch the scalar operands at all.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235079 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
test/CodeGen/AArch64/fold-constants.ll [new file with mode: 0644]