[LLVMdev] Promoting i1,i8,i16
Bill Wendling
isanbard at gmail.com
Tue Feb 3 11:01:27 PST 2009
On Tue, Feb 3, 2009 at 10:23 AM, Villmow, Micah <Micah.Villmow at amd.com> wrote:
> Is there a way to force llvm to promote all smaller types to i32 instead of
> i16?
>
This might help. In TargetLowering.h:
/// AddPromotedToType - If Opc/OrigVT is specified as being
promoted, the
/// promotion code defaults to trying a larger integer/fp until it
can find
/// one that works. If that default is insufficient, this method
can be used
/// by the target to override the default.
void AddPromotedToType(unsigned Opc, MVT OrigVT, MVT DestVT) {
PromoteToType[std::make_pair(Opc, OrigVT.getSimpleVT())] =
DestVT.getSimpleVT();
}
-bw
More information about the llvm-dev
mailing list