+2020-02-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/93533
+ * config/s390/s390.md (popcounthi2_z196): Fix up expander to emit
+ valid RTL to sum up the lowest and second lowest bytes of the popcnt
+ result.
+
2020-02-02 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/91333
})
(define_expand "popcounthi2_z196"
- [; popcnt op0, op1
- (parallel [(set (match_operand:HI 0 "register_operand" "")
+ [; popcnt op2, op1
+ (parallel [(set (match_dup 2)
(unspec:HI [(match_operand:HI 1 "register_operand")]
UNSPEC_POPCNT))
(clobber (reg:CC CC_REGNUM))])
- ; sllk op2, op0, 8
- (set (match_dup 2)
- (ashift:SI (match_dup 0) (const_int 8)))
- ; ar op0, op2
- (parallel [(set (match_dup 0) (plus:SI (match_dup 0) (match_dup 2)))
+ ; lr op3, op2
+ (set (match_dup 3) (subreg:SI (match_dup 2) 0))
+ ; srl op4, op3, 8
+ (set (match_dup 4) (lshiftrt:SI (match_dup 3) (const_int 8)))
+ ; ar op3, op4
+ (parallel [(set (match_dup 3) (plus:SI (match_dup 3) (match_dup 4)))
(clobber (reg:CC CC_REGNUM))])
- ; srl op0, op0, 8
- (set (match_dup 0) (lshiftrt:HI (match_dup 0) (const_int 8)))]
+ ; llgc op0, op3
+ (parallel [(set (match_operand:HI 0 "register_operand" "")
+ (and:HI (subreg:HI (match_dup 3) 2) (const_int 255)))
+ (clobber (reg:CC CC_REGNUM))])]
"TARGET_Z196"
- "operands[2] = gen_reg_rtx (SImode);")
+{
+ operands[2] = gen_reg_rtx (HImode);
+ operands[3] = gen_reg_rtx (SImode);
+ operands[4] = gen_reg_rtx (SImode);
+})
(define_expand "popcounthi2"
[(set (match_dup 2)
-2020-02-03 Jun Ma <JunMa@linux.alibaba.com>
+2020-02-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/93533
+ * gcc.c-torture/compile/pr93533.c: New test.
+ * gcc.target/s390/pr93533.c: New test.
+
+2020-02-03 Jun Ma <JunMa@linux.alibaba.com>
* g++.dg/coroutines/co-await-04-control-flow.C: Add label.