[Bug target/81317] builtin_vec_ld fails for powerpc with altivec
randy.macleod at windriver dot com
gcc-bugzilla@gcc.gnu.org
Wed Jul 19 16:14:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81317
--- Comment #18 from Randy MacLeod <randy.macleod at windriver dot com> ---
With both patches applied:
1. The "minimal testcase produced by the delta utility" no longer ICEs the
toolchain.
2. The "smaller reproducer with manual work-around " DOES STILL result in an
ICE as does the libjpeg-turbo build as you'd expect.
Here's the patch I'm using just to keep myself honest:
$ diffstat meta/recipes-devtools/gcc/gcc-7.1/backport-gcc-altivec-no-lhs.patch
rs6000-c.c | 2 ++
rs6000.c | 1 +
2 files changed, 3 insertions(+)
$ cat meta/recipes-devtools/gcc/gcc-7.1/backport-gcc-altivec-no-lhs.patch
--- a/gcc/config/rs6000/rs6000-c.c
+++ b/gcc/config/rs6000/rs6000-c.c
@@ -6216,6 +6216,8 @@
/* Strip qualifiers like "const" from the pointer arg. */
tree arg1_type = TREE_TYPE (arg1);
tree inner_type = TREE_TYPE (arg1_type);
+ if (!POINTER_TYPE_P (arg1_type))
+ goto bad;
if (TYPE_QUALS (TREE_TYPE (arg1_type)) != 0)
{
arg1_type = build_pointer_type (build_qualified_type (inner_type,
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -17001,6 +17001,7 @@
= (enum rs6000_builtins) DECL_FUNCTION_CODE (fndecl);
tree arg0, arg1, lhs;
+ if (!gimple_call_lhs (stmt)) return false;
switch (fn_code)
{
/* Flavors of vec_add. We deliberately don't expand
More information about the Gcc-bugs
mailing list