On 06/08/2019 18:30, Eric Botcazou wrote: >> Why is it incorrect? It's not canonical, sure. But the cannonical form >> does NOT describe what the instruction does. > > Yes, you run into this when you try to be clever with the carry. For the > Visium port I kludged around it by using: > > [(set (reg:CCC R_FLAGS) > (compare:CCC (not:I (match_operand:I 0 "register_operand" "r")) > (const_int -1)))] > > and recognizing the -1 in SELECT_CC_MODE. Obviously cumbersome though. >
Interesting. Does it work for the general case of a reverse subtract, which I need to handle as wel?