+2016-11-16 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * config/arc/arc.md (movb peephole2): New peephole2 to merge two
+ zero_extract operations to allow a movb to occur.
+ * testsuite/gcc.target/arc/movb-1.c: Update little endian arc results.
+ * testsuite/gcc.target/arc/movb-2.c: Likewise.
+ * testsuite/gcc.target/arc/movb-5.c: Likewise.
+ * testsuite/gcc.target/arc/movh_cl-1.c: Extend test to cover
+ little endian arc.
+
2016-11-16 Richard Sandiford <richard.sandiford@arm.com>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
(set_attr "iscompact" "maybe,false")
(set_attr "predicable" "no,no")])
+(define_peephole2
+ [(set (match_operand:SI 0 "register_operand" "")
+ (zero_extract:SI (match_dup 0)
+ (match_operand:SI 1 "const_int_operand" "")
+ (match_operand:SI 2 "const_int_operand" "")))
+ (set (zero_extract:SI (match_operand:SI 3 "register_operand" "")
+ (match_dup 1)
+ (match_dup 2))
+ (match_dup 0))]
+ "TARGET_NPS_BITOPS
+ && !reg_overlap_mentioned_p (operands[0], operands[3])"
+ [(set (zero_extract:SI (match_dup 3) (match_dup 1) (match_dup 2))
+ (zero_extract:SI (match_dup 0) (match_dup 1) (match_dup 2)))])
+
;; include the arc-FPX instructions
(include "fpx.md")
bar.b = foo.b;
}
/* { dg-final { scan-assembler "movb\[ \t\]+r\[0-5\]+, *r\[0-5\]+, *r\[0-5\]+, *5, *3, *8" { target arceb-*-* } } } */
-/* { dg-final { scan-assembler "movb\[ \t\]+r\[0-5\]+, *r\[0-5\]+, *r\[0-5\]+, *19, *21, *8" { target arc-*-* } } } */
+/* { dg-final { scan-assembler "movb\[ \t\]+r\[0-5\]+, *r\[0-5\]+, *r\[0-5\]+, *3, *5, *8" { target arc-*-* } } } */
{
bar.b = foo.b;
}
-/* { dg-final { scan-assembler "movb\[ \t\]+r\[0-5\]+, *r\[0-5\]+, *r\[0-5\]+, *23, *23, *9" { target arc-*-* } } } */
+/* { dg-final { scan-assembler "movb\[ \t\]+r\[0-5\]+, *r\[0-5\]+, *r\[0-5\]+, *7, *7, *9" { target arc-*-* } } } */
/* { dg-final { scan-assembler "movb\[ \t\]+r\[0-5\]+, *r\[0-5\]+, *r\[0-5\]+, *0, *0, *9" { target arceb-*-* } } } */
{
bar.b = foo.b;
}
-/* { dg-final { scan-assembler "movb\[ \t\]+r\[0-5\]+, *r\[0-5\]+, *r\[0-5\]+, *23, *(23|7), *9" { target arc-*-* } } } */
+/* { dg-final { scan-assembler "movb\[ \t\]+r\[0-5\]+, *r\[0-5\]+, *r\[0-5\]+, *7, *7, *9" { target arc-*-* } } } */
/* { dg-final { scan-assembler "movb\[ \t\]+r\[0-5\]+, *r\[0-5\]+, *r\[0-5\]+, *0, *0, *9" { target arceb-*-* } } } */
{
unsigned a : 1;
unsigned b : 1;
+ unsigned c : 28;
+ unsigned d : 1;
+ unsigned e : 1;
};
};
};
func (xx.raw);
}
+void
+woof ()
+{
+ struct thing xx;
+ xx.d = xx.e = 1;
+ func (xx.raw);
+}
+
/* { dg-final { scan-assembler "movh\.cl r\[0-9\]+,0xc0000000>>16" } } */