Michael.Kang
2010-Jul-13 11:20 UTC
[LLVMdev] The question of sext instruction implementation
I saw the description in llvm documenattion for sext is as the following : -- sext (CST to TYPE) Sign extend a constant to another type. The bit size of CST must be smaller or equal to the bit size of TYPE. Both types must be integers. But in the code of llvm-2.6, the judge condition just allow smaller to the bit size of TYPE as the following : case Instruction::SExt: return SrcTy->isIntOrIntVector() && DstTy->isIntOrIntVector()&& SrcBitSize < DstBitSize; So I feel confused the difference about the documentation and implementation. Thanks MK ---------------------------------------- www.skyeye.org
Duncan Sands
2010-Jul-13 12:08 UTC
[LLVMdev] The question of sext instruction implementation
Hi Michael, this was a mistake in the documentation, which I have corrected. Note that the documentation you referred to was talking about constants while the code you quoted was for instructions and not constants. However the code for constants performs an analogous check. Ciao, Duncan.> I saw the description in llvm documenattion for sext is as the following : > > -- sext (CST to TYPE) > Sign extend a constant to another type. The bit size of CST must > be smaller or equal to the bit size of TYPE. Both types must be > integers. > > But in the code of llvm-2.6, the judge condition just allow smaller to > the bit size of TYPE as the following : > > case Instruction::SExt: > return SrcTy->isIntOrIntVector()&& > DstTy->isIntOrIntVector()&& SrcBitSize< DstBitSize; > > So I feel confused the difference about the documentation and implementation. > > Thanks > MK > ---------------------------------------- > www.skyeye.org > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Seemingly Similar Threads
- [PATCH] nv50/ir: make ARB_viewport_array behave like it does with other drivers
- [PATCH v3] nv50/ir: make ARB_viewport_array behave like it does with other drivers
- [PATCH v2] nv50/ir: make ARB_viewport_array behave like it does with other drivers
- [LLVMdev] alignment checking in isSafeToEliminateVarargsCast
- [PATCH 01/11] nvc0/ir: add emission of dadd/dmul/dmad opcodes, fix minmax