https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59968

--- Comment #22 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Bernd Buschinski from comment #21)
> Hi, I just found this old bug report. Not sure if I should ask the question
> here or open a new bug or whatever is the correct thing to do, so please
> tell me if this is the wrong place.

Patch in testing:

--cut here--
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index e514809453d..9f6938b107c 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -19811,8 +19811,8 @@ (define_insn_and_split "*bt<mode>_setc<mode>_mask"
          (match_operand:SWI48 1 "register_operand")
          (const_int 1)
          (subreg:QI
-           (and:SWI48
-             (match_operand:SWI48 2 "register_operand")
+           (and
+             (match_operand 2 "int248_register_operand")
              (match_operand 3 "const_int_operand")) 0)))
    (clobber (reg:CC FLAGS_REG))]
   "TARGET_USE_BT
--cut here--

The patched compiler generates:

mask_get_flag:
        xorl    %eax, %eax
        btq     %rsi, %rdi
        setc    %al
        ret

Reply via email to