+2017-03-13 Claudiu Zissulescu <claziss@synopsys.com>
+
+ * config/arc/arc.md (*tst_bitfield_tst): Fix pattern.
+
2017-03-13 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (arc_output_addsi): Emit code density adds.
&& (INTVAL (operands[3]) + INTVAL (operands[2]) <= 11
|| (INTVAL (operands[3]) <= 11
&& INTVAL (operands[3]) + INTVAL (operands[2]) == 32))"
- "tst %1,(1<<%2)-1<<%3"
+ "tst %1,((1<<%2)-1)<<%3"
[(set_attr "type" "compare")
(set_attr "cond" "set_zn")
(set_attr "length" "4")])
+2017-03-13 Claudiu Zissulescu <claziss@synopsys.com>
+
+ * testsuite/gcc.target/arc/bitfield.c: New file.
+
2017-03-13 Claudiu Zissulescu <claziss@synopsys.com>
* testsuite/gcc.target/arc/pr9001090948.c: New file.
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+#include <stdlib.h>
+
+struct ubifs_budget_req {
+ unsigned int fast:7;
+ unsigned int new_ino_d:13;
+};
+
+int printf(const char *format, ...);
+
+void __attribute__ ((noinline))
+fff(struct ubifs_budget_req *req)
+{
+ if (req->new_ino_d & 7)
+ abort ();
+}
+
+int main (void)
+{
+ struct ubifs_budget_req req = {
+ .fast = 8,
+ .new_ino_d = 0,
+ };
+ fff(&req);
+ return 0;
+}