Is there a way to force llvm to promote all smaller types to i32 instead of i16? Thanks, Micah Villmow Systems Engineer Advanced Technology & Performance Advanced Micro Devices Inc. S1-609 One AMD Place Sunnyvale, CA. 94085 P: 408-749-3966 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090203/7fa691f3/attachment.html>
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
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?It should just work if i16 is also set to promote... what are you trying to do? -Eli
I want to promote i1 to i32 and not i16 as i32 is my native type and i16 is emulated, but I need to handle i16 as a special case so I don't want to promote it. I will see if what Bill pointed out is what I need. Micah -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Eli Friedman Sent: Tuesday, February 03, 2009 11:08 AM To: LLVM Developers Mailing List Subject: Re: [LLVMdev] Promoting i1,i8,i16 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 i32instead of> i16?It should just work if i16 is also set to promote... what are you trying to do? -Eli _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Maybe Matching Threads
- [LLVMdev] Vector promotion broken for <2 x [i8|i16]>
- [LLVMdev] Vector promotion broken for <2 x [i8|i16]>
- [LLVMdev] Vector promotion broken for <2 x [i8|i16]>
- [LLVMdev] Vector promotion broken for <2 x [i8|i16]>
- [LLVMdev] Vector promotion broken for <2 x [i8|i16]>