[Bug target/106602] riscv: suboptimal codegen for zero_extendsidi2_shifted w/o bitmanip

law at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Nov 2 01:03:38 GMT 2022


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

--- Comment #13 from Jeffrey A. Law <law at gcc dot gnu.org> ---

Trying 7, 8, 9 -> 10:
    7: r140:DI=0x1
    8: r141:DI=r140:DI<<0x26
      REG_DEAD r140:DI
      REG_EQUAL 0x4000000000
    9: r139:DI=r141:DI-0x40
      REG_DEAD r141:DI
      REG_EQUAL 0x3fffffffc0
   10: r137:DI=r138:DI&r139:DI
      REG_DEAD r139:DI
      REG_DEAD r138:DI
Failed to match this instruction:
(set (reg:DI 137)
    (and:DI (reg:DI 138)
        (const_int 274877906880 [0x3fffffffc0])))


That's what we're looking for.  I think I had a wrong switch somewhere.  Match
that with a define_split and you should be good to go.


More information about the Gcc-bugs mailing list