]> granicus.if.org Git - clang/commit
Move vector bitcast handling in constant expressions from the expression
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 6 Dec 2011 22:44:34 +0000 (22:44 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 6 Dec 2011 22:44:34 +0000 (22:44 +0000)
commitd62ca370b03b8c6ad58002d3399383baf744e32b
treee805e191aff3cb11f988da468e4b84a594d29562
parent1e821e9eba7c48f375c7cb5c9e19c489e17ec58a
Move vector bitcast handling in constant expressions from the expression
evaluator into constant initializer handling / IRGen. The practical consequence
of this is that the bitcast now lives in the constant's definition, rather than
in its uses.

The code in the constant expression evaluator was producing vectors of the wrong
type and size (and possibly of the wrong value for a big-endian int-to-vector
bitcast). We were getting away with this only because we don't yet support
constant-folding of any expressions which inspect vector values.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145981 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/Expr.cpp
lib/AST/ExprConstant.cpp
test/CodeGen/altivec.c