On 9/4/24 8:08 AM, Xi Ruoyao wrote:
Hi Jeff,

On Mon, 2024-09-02 at 12:53 -0600, Jeff Law wrote:
  (define_insn_and_split "<optab>_shift_reverse<X:mode>"
    [(set (match_operand:X 0 "register_operand" "=r")
      (any_bitwise:X (ashift:X (match_operand:X 1 "register_operand" "r")
@@ -2934,9 +2936,9 @@ (define_insn_and_split "<optab>_shift_reverse<X:mode>"
    "(!SMALL_OPERAND (INTVAL (operands[3]))
      && SMALL_OPERAND (INTVAL (operands[3]) >> INTVAL (operands[2]))
      && popcount_hwi (INTVAL (operands[3])) > 1

I'm wondering why we need to check the popcount.  With this patch
applied:
Zbs can do these things with the single bit manipulation instructions. It would be reasonable to make it (TARGET_ZBS && popcount_hwi ...)

jeff

Reply via email to