search for: isx86_mmxty

Displaying 3 results from an estimated 3 matches for "isx86_mmxty".

2015 Jun 09
2
[LLVMdev] Constant folding inttoptr i32 0 to null pointer?
...gt;> >> >> Constant *llvm::ConstantFoldCastInstruction(unsigned opc, Constant *V, >> >> Type *DestTy) { >> >> >> >> ... >> >> >> >> if (V->isNullValue() && !DestTy->isX86_MMXTy()) >> >> return Constant::getNullValue(DestTy); >> >> ... >> >> >> >> >> >> Is this a bug? >> >> >> >> Thanks >> >> Guy >> >> >> >> >> >> >> >> *F...
2015 Jun 09
4
[LLVMdev] Constant folding inttoptr i32 0 to null pointer?
...to check for address space, it simply checks if the integer in question is zero, and folds the inttoptr to null: Constant *llvm::ConstantFoldCastInstruction(unsigned opc, Constant *V, Type *DestTy) { ... if (V->isNullValue() && !DestTy->isX86_MMXTy()) return Constant::getNullValue(DestTy); ... Is this a bug? Thanks Guy From: David Majnemer [mailto:david.majnemer at gmail.com] Sent: Tuesday, June 09, 2015 18:45 To: Benyei, Guy Cc: llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] Constant folding inttoptr i32 0 to null pointer? O...
2015 Jun 09
2
[LLVMdev] Constant folding inttoptr i32 0 to null pointer?
Hello, It seems that ConstantFoldCastInstruction in ConstantFold.cpp folds inttoptr instruction with 0 as operand to a null pointer. It makes sense, when talking about a C-style frontend, as the C99 spec (6.3.2.3) states: "An integer constant expression with the value 0, or such an expression cast to type void *, is called a null pointer constant." On the other hand, some architectures