[llvm-commits] [dragonegg] r95498 - /dragonegg/trunk/llvm-convert.cpp
Duncan Sands
baldrick at free.fr
Sat Feb 6 05:41:39 PST 2010
Author: baldrick
Date: Sat Feb 6 07:41:39 2010
New Revision: 95498
URL: http://llvm.org/viewvc/llvm-project?rev=95498&view=rev
Log:
GCC special cases constant vector constructors. Do the same,
fixing a crash on GCC testcase pr34856.c.
Modified:
dragonegg/trunk/llvm-convert.cpp
Modified: dragonegg/trunk/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-convert.cpp?rev=95498&r1=95497&r2=95498&view=diff
==============================================================================
--- dragonegg/trunk/llvm-convert.cpp (original)
+++ dragonegg/trunk/llvm-convert.cpp Sat Feb 6 07:41:39 2010
@@ -7305,7 +7305,10 @@
case OBJ_TYPE_REF: return EmitOBJ_TYPE_REF(rhs);
// Exceptional (tcc_exceptional).
- case CONSTRUCTOR: return EmitCONSTRUCTOR(rhs, 0);
+ case CONSTRUCTOR:
+ // Vector constant constructors are gimple invariant.
+ return is_gimple_constant(rhs) ?
+ EmitRegisterConstant(rhs) : EmitCONSTRUCTOR(rhs, 0);
// References (tcc_reference).
case ARRAY_REF:
More information about the llvm-commits
mailing list