[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp LegalizeDAG.cpp SelectionDAG.cpp SelectionDAGISel.cpp TargetLowering.cpp
Dan Gohman
djg at cray.com
Tue Jul 3 14:13:20 PDT 2007
>> We overload ISD::FADD and quite a lot of others. Why not
>> ISD::ConstantFP too?
>
> Fair enough, after pondering on it, I agree with you. The proposed
> semantics are that a ConstantFP (and also a normal Constant?) produce
> the splatted immediate value?
Constant sounds good too. And UNDEF, for that matter. And yes, that's the
semantics I mean.
> If so, this sounds fine. This should also reduce codegen memory
> usage for many common cases, a very nice bonus :)
:)
> Please add a dag combine xform from build_vector [c,c,c,c] ->
> constantfp and friends.
I sketched out some of the code for this. One question that's come up so far is
whether if the vector has some undef elements but all the non-undef elements
are equal it should still be folded. My initial preference is to still fold it,
since that lets things like isBuildVectorAllZeros become trivial to unnecessary,
but it is a pessimization in some obscure cases.
Dan
--
Dan Gohman, Cray Inc.
More information about the llvm-commits
mailing list