On Jan 20, 2007, at 4:57 PM, Chris Lattner wrote:
This fixes test/CFrontend/2007-01-20-VectorICE.c
This is a short-term fix that reverts a recent part of the merge
from apple gcc head. I will track down the real problem shortly.
Patch here:
===================================================================
--- convert.c (revision 122668)
+++ convert.c (working copy)
@@ -750,8 +750,7 @@
return convert (type, build_compound_literal_vector
(TREE_TYPE (expr), expr));
/* APPLE LOCAL end AltiVec */
- /* APPLE LOCAL mainline 4253848 */
- return build1 (VIEW_CONVERT_EXPR, type, expr);
+ return build1 (NOP_EXPR, type, expr);
default:
error ("can't convert value to a vector");
Okay, here's the real fix. Apparently DECL_GIMPLE_FORMAL_TEMP_P's
are allowed to have their address taken. When this happens,
TREE_ADDRESSABLE is set, but DECL_GIMPLE_FORMAL_TEMP_P isn't
cleared. As such, only consider DECL_GIMPLE_FORMAL_TEMP_P's that
don't have TREE_ADDRESSABLE to be SSA values.
Index: llvm-convert.cpp
===================================================================
--- llvm-convert.cpp (revision 122670)
+++ llvm-convert.cpp (working copy)
@@ -74,7 +74,7 @@
/// "gimple_formal_tmp_var".
static bool isGCC_SSA_Temporary(tree decl) {
return TREE_CODE(decl) == VAR_DECL &&
- DECL_GIMPLE_FORMAL_TEMP_P(decl) &&
+ DECL_GIMPLE_FORMAL_TEMP_P(decl) && !TREE_ADDRESSABLE(decl) &&
!isAggregateType(TREE_TYPE(decl));
}
Index: convert.c
===================================================================
--- convert.c (revision 122671)
+++ convert.c (working copy)
@@ -750,7 +750,8 @@
return convert (type, build_compound_literal_vector (TREE_TYPE
(expr), expr));
/* APPLE LOCAL end AltiVec */
- return build1 (NOP_EXPR, type, expr);
+ /* APPLE LOCAL mainline 4253848 */
+ return build1 (VIEW_CONVERT_EXPR, type, expr);
default:
error ("can't convert value to a vector");
-Chris
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits