https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64093
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Try this patch: Index: rs6000.md =================================================================== --- rs6000.md (revision 218072) +++ rs6000.md (working copy) @@ -2644,7 +2644,8 @@ (define_expand "and<mode>3" } if (logical_const_operand (operands[2], <MODE>mode) - && !any_mask_operand (operands[2], <MODE>mode)) + && !any_mask_operand (operands[2], <MODE>mode) + && rs6000_gen_cell_microcode) { emit_insn (gen_and<mode>3_imm (operands[0], operands[1], operands[2])); DONE;