[llvm-commits] [PATCH] Instcombine : extractelement(cast) -> cast(extractelement)
Duncan Sands
baldrick at free.fr
Thu Mar 31 09:24:55 PDT 2011
Hi Nadav,
> + return CastInst::Create(CI->getOpcode(), cast<Instruction>(EE),
>
> + EI.getType());
as far as I can see there is no need to cast to an instruction. And if
the vector was a constant then the builder will have created a constant
extract element in which case casting to an instruction will cause an
assertion failure. So I suggest you just remove the cast. Looks good
otherwise.
Ciao, Duncan.
More information about the llvm-commits
mailing list