[Bug target/104375] [x86] Failure to recognize bzhi pattern when shr is present
crazylht at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Apr 28 07:09:38 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104375
--- Comment #1 from Hongtao.liu <crazylht at gmail dot com> ---
backend has
16550(define_insn "*bmi2_bzhi_<mode>3_2"
16551 [(set (match_operand:SWI48 0 "register_operand" "=r")
16552 (and:SWI48
16553 (plus:SWI48
16554 (ashift:SWI48 (const_int 1)
16555 (match_operand:QI 2 "register_operand" "r"))
16556 (const_int -1))
16557 (match_operand:SWI48 1 "nonimmediate_operand" "rm")))
16558 (clobber (reg:CC FLAGS_REG))]
16559 "TARGET_BMI2"
16560 "bzhi\t{%<k>2, %1, %0|%0, %1, %<k>2}"
16561 [(set_attr "type" "bitmanip")
16562 (set_attr "prefix" "vex")
16563 (set_attr "mode" "<MODE>")])
But there's extra zero_extend in pattern match.
315Failed to match this instruction:
316(parallel [
317 (set (reg:DI 90)
318 (zero_extend:DI (and:SI (plus:SI (reg:SI 91)
319 (const_int -1 [0xffffffffffffffff]))
320 (subreg:SI (reg:DI 95) 0))))
321 (clobber (reg:CC 17 flags))
322 ])
More information about the Gcc-bugs
mailing list