- if (is_compound_address(ft, pred)) {
- /* we can do the copy-return optimization here */
- cr_opt[n_cr_opt].ent = get_Sel_entity(pred);
- cr_opt[n_cr_opt].arg = arg;
- ++n_cr_opt;
- } else { /* copy-return optimization is impossible, do the copy. */
- copy = new_r_CopyB(
- irg, bl,
- mem,
- arg,
- pred,
- tp
- );
- mem = new_r_Proj(irg, bl, copy, mode_M, pn_CopyB_M_regular);
+ if (is_Unknown(pred)) {
+ /* The Return(Unknown) is the Firm construct for a missing return.
+ Do nothing. */
+ } else {
+ if (is_compound_address(ft, pred)) {
+ /* we can do the copy-return optimization here */
+ cr_opt[n_cr_opt].ent = get_Sel_entity(pred);
+ cr_opt[n_cr_opt].arg = arg;
+ ++n_cr_opt;
+ } else { /* copy-return optimization is impossible, do the copy. */
+ copy = new_r_CopyB(
+ irg, bl,
+ mem,
+ arg,
+ pred,
+ tp
+ );
+ mem = new_r_Proj(irg, bl, copy, mode_M, pn_CopyB_M_regular);
+ }