--- Comment #2 from dorit at il dot ibm dot com 2006-02-20 17:09 ---
Actually there's this patch by rth that seems to fix this ICE; it's from a
while back, I don't think it was fully tested at the time, and I'm not sure it
provides all the missing bits/fixes for SSE support.
=== targhooks.c
==
--- targhooks.c (revision 108004)
+++ targhooks.c (local)
@@ -448,7 +448,8 @@
tree type;
enum machine_mode mode;
block_stmt_iterator bsi;
- tree th, tl, result, x;
+ tree t1, t2, result, x;
+ int i, n;
/* If the first argument is a type, just check if support
is available. Return a non NULL value if supported, NULL_TREE otherwise.
@@ -472,31 +473,37 @@
return NULL;
bsi = bsi_for_stmt (stmt);
-
- th = make_rename_temp (type, NULL);
- x = build2 (VEC_INTERLEAVE_HIGH_EXPR, type, vec1, vec2);
- x = build2 (MODIFY_EXPR, type, th, x);
- th = make_ssa_name (th, x);
- TREE_OPERAND (x, 0) = th;
- bsi_insert_before (bsi, x, BSI_SAME_STMT);
- tl = make_rename_temp (type, NULL);
- x = build2 (VEC_INTERLEAVE_LOW_EXPR, type, vec1, vec2);
- x = build2 (MODIFY_EXPR, type, tl, x);
- tl = make_ssa_name (tl, x);
- TREE_OPERAND (x, 0) = tl;
- bsi_insert_before (bsi, x, BSI_SAME_STMT);
+ n = exact_log2 (GET_MODE_NUNITS (mode)) - 1;
+ for (i = 0; i n; ++i)
+{
+ t1 = create_tmp_var (type, NULL);
+ add_referenced_tmp_var (t1);
+ x = build2 (VEC_INTERLEAVE_HIGH_EXPR, type, vec1, vec2);
+ x = build2 (MODIFY_EXPR, type, t1, x);
+ t1 = make_ssa_name (t1, x);
+ TREE_OPERAND (x, 0) = t1;
+ bsi_insert_before (bsi, x, BSI_SAME_STMT);
- result = make_rename_temp (type, NULL);
- /* ??? Endianness issues? */
+ t2 = create_tmp_var (type, NULL);
+ add_referenced_tmp_var (t2);
+ x = build2 (VEC_INTERLEAVE_LOW_EXPR, type, vec1, vec2);
+ x = build2 (MODIFY_EXPR, type, t2, x);
+ t2 = make_ssa_name (t2, x);
+ TREE_OPERAND (x, 0) = t2;
+ bsi_insert_before (bsi, x, BSI_SAME_STMT);
+
+ if (BYTES_BIG_ENDIAN)
+vec1 = t1, vec2 = t2;
+ else
+vec1 = t2, vec2 = t1;
+}
+
x = build2 (odd_p ? VEC_INTERLEAVE_HIGH_EXPR : VEC_INTERLEAVE_LOW_EXPR,
- type, th, tl);
- x = build2 (MODIFY_EXPR, type, result, x);
- result = make_ssa_name (result, x);
- TREE_OPERAND (x, 0) = result;
- bsi_insert_before (bsi, x, BSI_SAME_STMT);
+ type, vec1, vec2);
+ x = build2 (MODIFY_EXPR, type, dest, x);
- return result;
+ return x;
}
tree
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26362