This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++ delayed folding branch review


On 08/27/2015 02:12 PM, Kai Tietz wrote:
+  else if (TREE_CODE (type) == VECTOR_TYPE)
+    {
+      if (TREE_CODE (arg1) == VECTOR_CST
+         && code == NOP_EXPR
+         && TYPE_VECTOR_SUBPARTS (type) == VECTOR_CST_NELTS (arg1))
+       {
+         tree r = copy_node (arg1);
+         TREE_TYPE (arg1) = type;
+         return r;
+       }
+    }

I would drop the check on 'code' and add a check that

 TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (TREE_TYPE (arg1))

Does that still pass?

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]