Hi Jeff, Richard,

Not sure if that working.

I created some rtl using TRAP_IF to represent the TEQ and emiited via an 
expander 

The TRAP_IF rtl make ait all the way though the rtl optimizers which are run 
after expand
even though it should be possible to determine is false.


(insn 7 3 20 2 (set (reg:SI 2 $2 [201])
        (const_int 27 [0x1b])) bug.c:67 289 {*movsi_internal}
     (expr_list:REG_EQUIV (const_int 27 [0x1b])
        (nil)))

(insn 20 7 21 2 (trap_if (eq:SI (reg:SI 2 $2 [201])
            (const_int 0 [0]))
        (const_int 7 [0x7])) bug.c:68 8 {*conditional_trapNsi_if_zero}
     (nil))

I grepped the RTL code for any code handling TRAP_IF that looked like it might 
remove the TRAP_IF but
only found some code is final_scan which only applied to CC0 backends. 

Is using a conditional trap (TRAP_IF)  the right way to go?

Graham

Reply via email to