mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-23 22:23:00 +00:00
Enhance constant folding of bitcast operations on vectors of floats.
Add getAllOnesValue of FP numbers to Constants and APFloat. Add more tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125776 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -43,8 +43,7 @@ using namespace llvm;
|
||||
static Constant *BitCastConstantVector(ConstantVector *CV,
|
||||
const VectorType *DstTy) {
|
||||
|
||||
if (CV->isAllOnesValue() && DstTy->getElementType()->isIntegerTy())
|
||||
return Constant::getAllOnesValue(DstTy);
|
||||
if (CV->isAllOnesValue()) return Constant::getAllOnesValue(DstTy);
|
||||
if (CV->isNullValue()) return Constant::getNullValue(DstTy);
|
||||
|
||||
// If this cast changes element count then we can't handle it here:
|
||||
|
||||
Reference in New Issue
Block a user