|
LLVM 24.0.0git
|
Reinterprets the bits of a value as another type of the same size, for example float 1.0 as i32 0x3f800000, a null pointer as i64 0, or <2 x i32> as double. More...
#include "llvm/Transforms/Vectorize/SandboxVectorizer/Passes/LoadStoreVec.h"
Static Public Member Functions | |
| static LLVM_ABI bool | canReinterpret (Type *SrcTy, Type *DestTy, const DataLayout &DL) |
| static LLVM_ABI Constant * | reinterpretConstant (Constant *C, Type *DestTy, const DataLayout &DL) |
Reinterprets constant C as DestTy, e.g., float 1.0 to i32 0x3f800000, or a null pointer to i64 0. | |
Reinterprets the bits of a value as another type of the same size, for example float 1.0 as i32 0x3f800000, a null pointer as i64 0, or <2 x i32> as double.
Used by createConstantVector() to pack constants, and by vectorizeLoads() to unpack each load from the vector load.
Definition at line 43 of file LoadStoreVec.h.
|
static |
SrcTy can be reinterpreted as DestTy. False when either type is a non-integral pointer, which has no stable integer representation. Definition at line 83 of file LoadStoreVec.cpp.
References DL, and llvm::sandboxir::isNonIntegralPtr().
Referenced by reinterpretConstant().
|
static |
Reinterprets constant C as DestTy, e.g., float 1.0 to i32 0x3f800000, or a null pointer to i64 0.
Definition at line 125 of file LoadStoreVec.cpp.
References C(), canReinterpret(), DL, llvm::sandboxir::ConstantExpr::getBitCast(), llvm::sandboxir::ConstantExpr::getIntToPtr(), llvm::sandboxir::ConstantExpr::getPtrToInt(), llvm_unreachable, and Opc.