>> 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. _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits