It may be correct for the pattern to not be matched with expand. It's OK if the if-conversion pass picks it up, which seems to be what is happening for you. If the generated code you are getting is wrong, then problem is likely in the define_insn patterns somewhere. They don't correct represent what the instruction does, or they don't correctly implement it. Ian
After some modifications, I managed to make gcc use my define_expand - I see it in debug.11.ce1 and following files, but then it disapears in debug.17.combine, and in the end it does not appear in asm code. How to find out what kills it? :)