mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Stores of null pointers should turn into memset, we weren't recognizing
them as splat values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126041 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1163,6 +1163,11 @@ bool llvm::CannotBeNegativeZero(const Value *V, unsigned Depth) {
|
||||
Value *llvm::isBytewiseValue(Value *V) {
|
||||
// All byte-wide stores are splatable, even of arbitrary variables.
|
||||
if (V->getType()->isIntegerTy(8)) return V;
|
||||
|
||||
// Handle 'null' ConstantArrayZero etc.
|
||||
if (Constant *C = dyn_cast<Constant>(V))
|
||||
if (C->isNullValue())
|
||||
return Constant::getNullValue(Type::getInt8Ty(V->getContext()));
|
||||
|
||||
// Constant float and double values can be handled as integer values if the
|
||||
// corresponding integer value is "byteable". An important case is 0.0.
|
||||
|
Reference in New Issue
Block a user