|
From: <sv...@va...> - 2011-02-10 12:20:25
|
Author: sewardj
Date: 2011-02-10 12:20:02 +0000 (Thu, 10 Feb 2011)
New Revision: 2088
Log:
Handle Ico_V128(0xFFFF), created by more aggressive constant folding
in ir_opt.c. Fixes #262985 (a regression from 3.5.0).
(Maynard Johnson, may...@us...)
Modified:
trunk/priv/host_ppc_isel.c
Modified: trunk/priv/host_ppc_isel.c
===================================================================
--- trunk/priv/host_ppc_isel.c 2011-02-09 14:21:45 UTC (rev 2087)
+++ trunk/priv/host_ppc_isel.c 2011-02-10 12:20:02 UTC (rev 2088)
@@ -994,7 +994,17 @@
return dst;
}
+/* Generate all-ones into a new vector register.
+*/
+static HReg generate_ones_V128 ( ISelEnv* env )
+{
+ HReg dst = newVRegV(env);
+ PPCVI5s * src = PPCVI5s_Imm(-1);
+ addInstr(env, PPCInstr_AvSplat(8, dst, src));
+ return dst;
+}
+
/*
Generates code for AvSplat
- takes in IRExpr* of type 8|16|32
@@ -3710,6 +3720,9 @@
vassert(e->Iex.Const.con->tag == Ico_V128);
if (e->Iex.Const.con->Ico.V128 == 0x0000) {
return generate_zeroes_V128(env);
+ }
+ else if (e->Iex.Const.con->Ico.V128 == 0xffff) {
+ return generate_ones_V128(env);
}
}
|