PATCH] ARM NEON Lowering: Merge extractelt, bitcast, sitofp sequence

Jakob Stoklund Olesen stoklund at 2pi.dk
Fri Feb 15 11:20:41 PST 2013


On Feb 15, 2013, at 11:16 AM, Arnold Schwaighofer <aschwaighofer at apple.com> wrote:

> I think I am minimal now. I don't think I can get rid of the last remaining COPY_TO_REGCLASS. I think it needs to be there to assure the table gen type checker that we are all good copying from a (2xi32 DPRS:%src) to a (2f32 DPR:$src). But maybe there is a way. I am not sure what other instruction I could use that does not result in a real assembly instruction being generated (like a bitcast would).
> 
> def : Pat<(f32 (bitconvert (i32 (extractelt (v2i32 DPR:$src), imm:$lane)))),
>          (f32 (EXTRACT_SUBREG
>                (v2f32 (COPY_TO_REGCLASS (v2i32 DPR:$src), DPR)),    // <<< HERE
>                (SSubReg_f32_reg imm:$lane)))>;

Looks good.

Thanks,
/jakob




More information about the llvm-commits mailing list