aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SafeStackLayout.cpp
diff options
context:
space:
mode:
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2016-09-13 14:50:47 +0000
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2016-09-13 14:50:47 +0000
commit7277afeec1ca638fea3f987696df504138937d24 (patch)
treeee312a44cae17c22d336ec268cf8a292850f8934 /llvm/lib/CodeGen/SafeStackLayout.cpp
parent161c7f866114aea9901b9c9665f0af4786a62efa (diff)
downloadllvm-7277afeec1ca638fea3f987696df504138937d24.zip
llvm-7277afeec1ca638fea3f987696df504138937d24.tar.gz
llvm-7277afeec1ca638fea3f987696df504138937d24.tar.bz2
[ConstantFold] Improve the bitcast folding logic for constant vectors.
The constant folder didn't know how to always fold bitcasts of constant integer vectors. In particular, it was unable to handle the case where a constant vector had some undef elements, and the resulting (i.e. bitcasted) vector type had more elements than the original vector type. Example: %cast = bitcast <2 x i64><i64 undef, i64 2> to <4 x i32> On a little endian target, %cast could have been folded to: <4 x i32><i32 undef, i32 undef, i32 2, i32 0> This patch improves the folding logic by teaching how to correctly propagate undef elements in the folded vector. Differential Revision: https://reviews.llvm.org/D24301 llvm-svn: 281343
Diffstat (limited to 'llvm/lib/CodeGen/SafeStackLayout.cpp')
0 files changed, 0 insertions, 0 deletions