From baldrick at free.fr Mon Aug 22 01:57:36 2011
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 22 Aug 2011 06:57:36 -0000
Subject: [llvm-commits] [dragonegg] r138229 - /dragonegg/trunk/src/Types.cpp
Message-ID: <20110822065736.879092A6C12C@llvm.org>
Author: baldrick
Date: Mon Aug 22 01:57:36 2011
New Revision: 138229
URL: http://llvm.org/viewvc/llvm-project?rev=138229&view=rev
Log:
Handle the case in which an array type has an alignment less than
the element type. The gcc-4.5 optimizers sometimes produce this;
the gcc-4.6 optimizers don't seem to, so it's probably a gcc-4.5
bug. Turn on the check that LLVM types have alignment equal to
or less than the alignment of the corresponding GCC type.
Modified:
dragonegg/trunk/src/Types.cpp
Modified: dragonegg/trunk/src/Types.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Types.cpp?rev=138229&r1=138228&r2=138229&view=diff
==============================================================================
--- dragonegg/trunk/src/Types.cpp (original)
+++ dragonegg/trunk/src/Types.cpp Mon Aug 22 01:57:36 2011
@@ -321,11 +321,20 @@
return GetUnitType(C)->getPointerTo(AddrSpace);
}
+/// isSized - Return true if the GCC type has a size, perhaps variable. Note
+/// that this returns false for function types, for which the GCC type size
+/// doesn't represent anything useful for us.
+static bool isSized(tree type) {
+ if (TREE_CODE(type) == FUNCTION_TYPE || TREE_CODE(type) == METHOD_TYPE)
+ return false;
+ return TYPE_SIZE(type);
+}
+
/// isSizeCompatible - Return true if the specified gcc type is guaranteed to be
/// turned by ConvertType into an LLVM type of the same size (i.e. TYPE_SIZE the
/// same as getTypeAllocSizeInBits).
bool isSizeCompatible(tree type) {
- if (TREE_CODE(type) == FUNCTION_TYPE || TREE_CODE(type) == METHOD_TYPE)
+ if (!isSized(type))
return false;
return isInt64(TYPE_SIZE(type), true);
}
@@ -335,52 +344,54 @@
// Matching LLVM types with GCC trees
//===----------------------------------------------------------------------===//
-// llvm_set_type - Associate an LLVM type with each TREE type.
-// These are lazily computed by ConvertType.
-
-static Type *llvm_set_type(tree Tr, Type *Ty) {
- assert(TYPE_P(Tr) && "Expected a gcc type!");
-
+static Type *CheckTypeConversion(tree type, Type *Ty) {
#ifndef NDEBUG
bool Mismatch = false;
+ // If the GCC type has a size, check that the LLVM type does too. Note that
+ // the LLVM type may have a size when the GCC type does not. For example a
+ // C variable length array int[] may be converted into [0 x i32].
+ if (isSized(type) && !Ty->isSized()) {
+ Mismatch = true;
+ errs() << "The GCC type has a size but the LLVM type does not!\n";
+ }
// Check that the LLVM and GCC types really do have the same size when we say
// they do.
- if (isSizeCompatible(Tr)) {
- if (!Ty->isSized()) {
+ if (isSizeCompatible(type) && Ty->isSized()) {
+ uint64_t GCCSize = getInt64(TYPE_SIZE(type), true);
+ uint64_t LLVMSize = getTargetData().getTypeAllocSizeInBits(Ty);
+ if (LLVMSize != GCCSize) {
Mismatch = true;
- errs() << "No size\n";
- } else {
- uint64_t GCCSize = getInt64(TYPE_SIZE(Tr), true);
- uint64_t LLVMSize = getTargetData().getTypeAllocSizeInBits(Ty);
- if (LLVMSize != GCCSize) {
- errs() << "GCC size: " << GCCSize << "; LLVM size: " << LLVMSize
- << "\n";
- Mismatch = true;
- }
+ errs() << "GCC size: " << GCCSize << "; LLVM size: " << LLVMSize
+ << "!\n";
}
}
// Check that the LLVM type has the same alignment or less than the GCC type.
-// FIXME: Reduce LLVM array alignment when the GCC array has a small alignment
-// (due to an alignment clause?), then turn this back on.
-// if (Ty->isSized()) {
-// unsigned GCCAlign = TYPE_ALIGN(Tr);
-// unsigned LLVMAlign = getTargetData().getABITypeAlignment(Ty) * 8;
-// if (LLVMAlign > GCCAlign) {
-// errs() << "GCC align: " << GCCAlign << "; LLVM align: " << LLVMAlign
-// << "\n";
-// Mismatch = true;
-// }
-// }
+ if (Ty->isSized()) {
+ unsigned GCCAlign = TYPE_ALIGN(type);
+ unsigned LLVMAlign = getTargetData().getABITypeAlignment(Ty) * 8;
+ if (LLVMAlign > GCCAlign) {
+ Mismatch = true;
+ errs() << "GCC align: " << GCCAlign << "; LLVM align: " << LLVMAlign
+ << "\n";
+ }
+ }
if (Mismatch) {
errs() << "GCC: ";
- debug_tree(Tr);
+ debug_tree(type);
errs() << "LLVM: ";
Ty->print(errs());
DieAbjectly("\nLLVM type doesn't represent GCC type!");
}
#endif
- setCachedType(Tr, Ty);
+ return Ty;
+}
+
+// RememberTypeConversion - Associate an LLVM type with a GCC type.
+// These are lazily computed by ConvertType.
+static Type *RememberTypeConversion(tree type, Type *Ty) {
+ CheckTypeConversion(type, Ty);
+ setCachedType(type, Ty);
return Ty;
}
@@ -486,6 +497,10 @@
// Create the array type.
Type *Ty = ArrayType::get(ElementTy, NumElements);
+ // If the array is underaligned, wrap it in a packed struct.
+ if (TYPE_ALIGN(type) < getTargetData().getABITypeAlignment(Ty) * 8)
+ Ty = StructType::get(Context, Ty, /*isPacked*/ true);
+
// If the user increased the alignment of the array element type, then the
// size of the array is rounded up by that alignment even though the size
// of the array element type is not (!). Correct for this if necessary by
@@ -1295,25 +1310,25 @@
DieAbjectly("Unexpected type!", type);
case ARRAY_TYPE:
- return llvm_set_type(type, ConvertArrayTypeRecursive(type));
+ return RememberTypeConversion(type, ConvertArrayTypeRecursive(type));
case FUNCTION_TYPE:
case METHOD_TYPE: {
CallingConv::ID CallingConv;
AttrListPtr PAL;
// No declaration to pass through, passing NULL.
- return llvm_set_type(type, ConvertFunctionType(type, NULL, NULL,
- CallingConv, PAL));
+ return RememberTypeConversion(type, ConvertFunctionType(type, NULL, NULL,
+ CallingConv, PAL));
}
case POINTER_TYPE:
case REFERENCE_TYPE:
- return llvm_set_type(type, ConvertPointerTypeRecursive(type));
+ return RememberTypeConversion(type, ConvertPointerTypeRecursive(type));
case RECORD_TYPE:
case UNION_TYPE:
case QUAL_UNION_TYPE:
- return llvm_set_type(type, ConvertRecordTypeRecursive(type));
+ return RememberTypeConversion(type, ConvertRecordTypeRecursive(type));
}
}
@@ -1336,47 +1351,49 @@
// converted and we can safely return the result of the previous conversion.
Type *Ty = getCachedType(type);
assert(Ty && "Type not already converted!");
- return Ty;
+ return CheckTypeConversion(type, Ty);
}
case ENUMERAL_TYPE:
// If the enum is incomplete return a placeholder type.
if (!TYPE_SIZE(type))
- return Type::getInt32Ty(Context);
+ return CheckTypeConversion(type, GetUnitType(Context));
// Otherwise fall through.
case BOOLEAN_TYPE:
case INTEGER_TYPE: {
uint64_t Size = getInt64(TYPE_SIZE(type), true);
- return IntegerType::get(Context, Size); // Not worth caching.
+ // Caching the type conversion is not worth it.
+ return CheckTypeConversion(type, IntegerType::get(Context, Size));
}
case COMPLEX_TYPE: {
if (Type *Ty = getCachedType(type)) return Ty;
Type *Ty = ConvertTypeNonRecursive(TYPE_MAIN_VARIANT(TREE_TYPE(type)));
Ty = StructType::get(Ty, Ty, NULL);
- return llvm_set_type(type, Ty);
+ return RememberTypeConversion(type, Ty);
}
case OFFSET_TYPE:
// Handle OFFSET_TYPE specially. This is used for pointers to members,
// which are really just integer offsets. Return the appropriate integer
// type directly.
- return getTargetData().getIntPtrType(Context); // Not worth caching.
+ // Caching the type conversion is not worth it.
+ return CheckTypeConversion(type, getTargetData().getIntPtrType(Context));
case REAL_TYPE:
- // It is not worth caching the result of this type conversion.
+ // Caching the type conversion is not worth it.
switch (TYPE_PRECISION(type)) {
default:
DieAbjectly("Unknown FP type!", type);
- case 32: return Type::getFloatTy(Context);
- case 64: return Type::getDoubleTy(Context);
- case 80: return Type::getX86_FP80Ty(Context);
+ case 32: return CheckTypeConversion(type, Type::getFloatTy(Context));
+ case 64: return CheckTypeConversion(type, Type::getDoubleTy(Context));
+ case 80: return CheckTypeConversion(type, Type::getX86_FP80Ty(Context));
case 128:
#ifdef TARGET_POWERPC
- return Type::getPPC_FP128Ty(Context);
+ return CheckTypeConversion(type, Type::getPPC_FP128Ty(Context));
#else
// IEEE quad precision.
- return Type::getFP128Ty(Context);
+ return CheckTypeConversion(type, Type::getFP128Ty(Context));
#endif
}
@@ -1384,12 +1401,14 @@
case QUAL_UNION_TYPE:
case UNION_TYPE:
// If the type was already converted then return the already computed type.
- if (Type *Ty = getCachedType(type)) return Ty;
+ if (Type *Ty = getCachedType(type))
+ return CheckTypeConversion(type, Ty);
// Otherwise this must be an incomplete type - return an opaque struct.
assert(!TYPE_SIZE(type) && "Expected an incomplete type!");
- return llvm_set_type(type, StructType::create(Context,
- getDescriptiveName(type)));
+ return RememberTypeConversion(type,
+ StructType::create(Context,
+ getDescriptiveName(type)));
case VECTOR_TYPE: {
if (Type *Ty = getCachedType(type)) return Ty;
@@ -1401,11 +1420,12 @@
else
Ty = ConvertTypeNonRecursive(TYPE_MAIN_VARIANT(TREE_TYPE(type)));
Ty = VectorType::get(Ty, TYPE_VECTOR_SUBPARTS(type));
- return llvm_set_type(type, Ty);
+ return RememberTypeConversion(type, Ty);
}
case VOID_TYPE:
- return Type::getVoidTy(Context); // Not worth caching.
+ // Caching the type conversion is not worth it.
+ return CheckTypeConversion(type, Type::getVoidTy(Context));
}
}
@@ -1584,7 +1604,7 @@
// SCC as the pointer (since the SCC contains more than one type).
Type *PointeeTy = getCachedType(pointee);
assert(PointeeTy && "Pointee not converted!");
- llvm_set_type(some_type, PointeeTy->getPointerTo());
+ RememberTypeConversion(some_type, PointeeTy->getPointerTo());
}
}
}
From jay.foad at gmail.com Mon Aug 22 04:37:03 2011
From: jay.foad at gmail.com (Jay Foad)
Date: Mon, 22 Aug 2011 09:37:03 -0000
Subject: [llvm-commits] [llvm] r138230 - in /llvm/trunk/include/llvm:
Constants.h GlobalAlias.h OperandTraits.h
Message-ID: <20110822093703.C29192A6C12C@llvm.org>
Author: foad
Date: Mon Aug 22 04:37:03 2011
New Revision: 138230
URL: http://llvm.org/viewvc/llvm-project?rev=138230&view=rev
Log:
Remove DEFINE_TRANSPARENT_CASTED_OPERAND_ACCESSORS, folding its
functionality into DEFINE_TRANSPARENT_OPERAND_ACCESSORS. A side-effect
of this is that the operand accessors for Constants will tolerate NULL
operands, fixing PR10663.
Modified:
llvm/trunk/include/llvm/Constants.h
llvm/trunk/include/llvm/GlobalAlias.h
llvm/trunk/include/llvm/OperandTraits.h
Modified: llvm/trunk/include/llvm/Constants.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Constants.h?rev=138230&r1=138229&r2=138230&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Constants.h (original)
+++ llvm/trunk/include/llvm/Constants.h Mon Aug 22 04:37:03 2011
@@ -390,7 +390,7 @@
public VariadicOperandTraits {
};
-DEFINE_TRANSPARENT_CASTED_OPERAND_ACCESSORS(ConstantArray, Constant)
+DEFINE_TRANSPARENT_OPERAND_ACCESSORS(ConstantArray, Constant)
//===----------------------------------------------------------------------===//
// ConstantStruct - Constant Struct Declarations
@@ -450,7 +450,7 @@
public VariadicOperandTraits {
};
-DEFINE_TRANSPARENT_CASTED_OPERAND_ACCESSORS(ConstantStruct, Constant)
+DEFINE_TRANSPARENT_OPERAND_ACCESSORS(ConstantStruct, Constant)
//===----------------------------------------------------------------------===//
@@ -501,7 +501,7 @@
public VariadicOperandTraits {
};
-DEFINE_TRANSPARENT_CASTED_OPERAND_ACCESSORS(ConstantVector, Constant)
+DEFINE_TRANSPARENT_OPERAND_ACCESSORS(ConstantVector, Constant)
//===----------------------------------------------------------------------===//
/// ConstantPointerNull - a constant pointer value that points to null
@@ -575,7 +575,7 @@
public FixedNumOperandTraits {
};
-DEFINE_TRANSPARENT_CASTED_OPERAND_ACCESSORS(BlockAddress, Value)
+DEFINE_TRANSPARENT_OPERAND_ACCESSORS(BlockAddress, Value)
//===----------------------------------------------------------------------===//
@@ -884,7 +884,7 @@
public VariadicOperandTraits {
};
-DEFINE_TRANSPARENT_CASTED_OPERAND_ACCESSORS(ConstantExpr, Constant)
+DEFINE_TRANSPARENT_OPERAND_ACCESSORS(ConstantExpr, Constant)
//===----------------------------------------------------------------------===//
/// UndefValue - 'undef' values are things that do not have specified contents.
Modified: llvm/trunk/include/llvm/GlobalAlias.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/GlobalAlias.h?rev=138230&r1=138229&r2=138230&view=diff
==============================================================================
--- llvm/trunk/include/llvm/GlobalAlias.h (original)
+++ llvm/trunk/include/llvm/GlobalAlias.h Mon Aug 22 04:37:03 2011
@@ -87,7 +87,7 @@
public FixedNumOperandTraits {
};
-DEFINE_TRANSPARENT_CASTED_OPERAND_ACCESSORS(GlobalAlias, Constant)
+DEFINE_TRANSPARENT_OPERAND_ACCESSORS(GlobalAlias, Constant)
} // End llvm namespace
Modified: llvm/trunk/include/llvm/OperandTraits.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/OperandTraits.h?rev=138230&r1=138229&r2=138230&view=diff
==============================================================================
--- llvm/trunk/include/llvm/OperandTraits.h (original)
+++ llvm/trunk/include/llvm/OperandTraits.h Mon Aug 22 04:37:03 2011
@@ -136,45 +136,8 @@
VALUECLASS *CLASS::getOperand(unsigned i_nocapture) const { \
assert(i_nocapture < OperandTraits::operands(this) \
&& "getOperand() out of range!"); \
- return static_cast( \
- OperandTraits::op_begin(const_cast(this))[i_nocapture]); \
-} \
-void CLASS::setOperand(unsigned i_nocapture, VALUECLASS *Val_nocapture) { \
- assert(i_nocapture < OperandTraits::operands(this) \
- && "setOperand() out of range!"); \
- OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; \
-} \
-unsigned CLASS::getNumOperands() const { \
- return OperandTraits::operands(this); \
-} \
-template Use &CLASS::Op() { \
- return this->OpFrom(this); \
-} \
-template const Use &CLASS::Op() const { \
- return this->OpFrom(this); \
-}
-
-
-/// Macro for generating out-of-class operand accessor
-/// definitions with casted result
-#define DEFINE_TRANSPARENT_CASTED_OPERAND_ACCESSORS(CLASS, VALUECLASS) \
-CLASS::op_iterator CLASS::op_begin() { \
- return OperandTraits::op_begin(this); \
-} \
-CLASS::const_op_iterator CLASS::op_begin() const { \
- return OperandTraits::op_begin(const_cast(this)); \
-} \
-CLASS::op_iterator CLASS::op_end() { \
- return OperandTraits::op_end(this); \
-} \
-CLASS::const_op_iterator CLASS::op_end() const { \
- return OperandTraits::op_end(const_cast(this)); \
-} \
-VALUECLASS *CLASS::getOperand(unsigned i_nocapture) const { \
- assert(i_nocapture < OperandTraits::operands(this) \
- && "getOperand() out of range!"); \
- return cast( \
- OperandTraits::op_begin(const_cast(this))[i_nocapture]); \
+ return cast_or_null( \
+ OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); \
} \
void CLASS::setOperand(unsigned i_nocapture, VALUECLASS *Val_nocapture) { \
assert(i_nocapture < OperandTraits::operands(this) \
From baldrick at free.fr Mon Aug 22 05:32:10 2011
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 22 Aug 2011 10:32:10 -0000
Subject: [llvm-commits] [llvm] r138231 - in /llvm/trunk/test/Linker:
2011-08-22-ResolveAlias.ll 2011-08-22-ResolveAlias2.ll
Message-ID: <20110822103210.261A22A6C12C@llvm.org>
Author: baldrick
Date: Mon Aug 22 05:32:09 2011
New Revision: 138231
URL: http://llvm.org/viewvc/llvm-project?rev=138231&view=rev
Log:
Testcase for PR10663.
Added:
llvm/trunk/test/Linker/2011-08-22-ResolveAlias.ll
llvm/trunk/test/Linker/2011-08-22-ResolveAlias2.ll
Added: llvm/trunk/test/Linker/2011-08-22-ResolveAlias.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2011-08-22-ResolveAlias.ll?rev=138231&view=auto
==============================================================================
--- llvm/trunk/test/Linker/2011-08-22-ResolveAlias.ll (added)
+++ llvm/trunk/test/Linker/2011-08-22-ResolveAlias.ll Mon Aug 22 05:32:09 2011
@@ -0,0 +1,89 @@
+; PR10663
+; RUN: llvm-link %s %p/2011-08-22-ResolveAlias2.ll
+
+%union.pthread_attr_t = type { [56 x i8] }
+%union.pthread_mutex_t = type { [40 x i8] }
+%struct.timespec = type { i64, i64 }
+%union.pthread_mutexattr_t = type { [4 x i8] }
+%union.pthread_cond_t = type { [48 x i8] }
+
+ at _ZL20__gthrw_pthread_oncePiPFvvE = alias weak i32 (i32*, void ()*)* @pthread_once
+ at _ZL27__gthrw_pthread_getspecificj = alias weak i8* (i32)* @pthread_getspecific
+ at _ZL27__gthrw_pthread_setspecificjPKv = alias weak i32 (i32, i8*)* @pthread_setspecific
+ at _ZL22__gthrw_pthread_createPmPK14pthread_attr_tPFPvS3_ES3_ = alias weak i32 (i64*, %union.pthread_attr_t*, i8* (i8*)*, i8*)* @pthread_create
+ at _ZL20__gthrw_pthread_joinmPPv = alias weak i32 (i64, i8**)* @pthread_join
+ at _ZL21__gthrw_pthread_equalmm = alias weak i32 (i64, i64)* @pthread_equal
+ at _ZL20__gthrw_pthread_selfv = alias weak i64 ()* @pthread_self
+ at _ZL22__gthrw_pthread_detachm = alias weak i32 (i64)* @pthread_detach
+ at _ZL22__gthrw_pthread_cancelm = alias weak i32 (i64)* @pthread_cancel
+ at _ZL19__gthrw_sched_yieldv = alias weak i32 ()* @sched_yield
+ at _ZL26__gthrw_pthread_mutex_lockP15pthread_mutex_t = alias weak i32 (%union.pthread_mutex_t*)* @pthread_mutex_lock
+ at _ZL29__gthrw_pthread_mutex_trylockP15pthread_mutex_t = alias weak i32 (%union.pthread_mutex_t*)* @pthread_mutex_trylock
+ at _ZL31__gthrw_pthread_mutex_timedlockP15pthread_mutex_tPK8timespec = alias weak i32 (%union.pthread_mutex_t*, %struct.timespec*)* @pthread_mutex_timedlock
+ at _ZL28__gthrw_pthread_mutex_unlockP15pthread_mutex_t = alias weak i32 (%union.pthread_mutex_t*)* @pthread_mutex_unlock
+ at _ZL26__gthrw_pthread_mutex_initP15pthread_mutex_tPK19pthread_mutexattr_t = alias weak i32 (%union.pthread_mutex_t*, %union.pthread_mutexattr_t*)* @pthread_mutex_init
+ at _ZL29__gthrw_pthread_mutex_destroyP15pthread_mutex_t = alias weak i32 (%union.pthread_mutex_t*)* @pthread_mutex_destroy
+ at _ZL30__gthrw_pthread_cond_broadcastP14pthread_cond_t = alias weak i32 (%union.pthread_cond_t*)* @pthread_cond_broadcast
+ at _ZL27__gthrw_pthread_cond_signalP14pthread_cond_t = alias weak i32 (%union.pthread_cond_t*)* @pthread_cond_signal
+ at _ZL25__gthrw_pthread_cond_waitP14pthread_cond_tP15pthread_mutex_t = alias weak i32 (%union.pthread_cond_t*, %union.pthread_mutex_t*)* @pthread_cond_wait
+ at _ZL30__gthrw_pthread_cond_timedwaitP14pthread_cond_tP15pthread_mutex_tPK8timespec = alias weak i32 (%union.pthread_cond_t*, %union.pthread_mutex_t*, %struct.timespec*)* @pthread_cond_timedwait
+ at _ZL28__gthrw_pthread_cond_destroyP14pthread_cond_t = alias weak i32 (%union.pthread_cond_t*)* @pthread_cond_destroy
+ at _ZL26__gthrw_pthread_key_createPjPFvPvE = alias weak i32 (i32*, void (i8*)*)* @pthread_key_create
+ at _ZL26__gthrw_pthread_key_deletej = alias weak i32 (i32)* @pthread_key_delete
+ at _ZL30__gthrw_pthread_mutexattr_initP19pthread_mutexattr_t = alias weak i32 (%union.pthread_mutexattr_t*)* @pthread_mutexattr_init
+ at _ZL33__gthrw_pthread_mutexattr_settypeP19pthread_mutexattr_ti = alias weak i32 (%union.pthread_mutexattr_t*, i32)* @pthread_mutexattr_settype
+ at _ZL33__gthrw_pthread_mutexattr_destroyP19pthread_mutexattr_t = alias weak i32 (%union.pthread_mutexattr_t*)* @pthread_mutexattr_destroy
+
+declare extern_weak i32 @pthread_once(i32*, void ()*)
+
+declare extern_weak i8* @pthread_getspecific(i32)
+
+declare extern_weak i32 @pthread_setspecific(i32, i8*)
+
+declare extern_weak i32 @pthread_create(i64*, %union.pthread_attr_t*, i8* (i8*)*, i8*)
+
+declare extern_weak i32 @pthread_join(i64, i8**)
+
+declare extern_weak i32 @pthread_equal(i64, i64)
+
+declare extern_weak i64 @pthread_self()
+
+declare extern_weak i32 @pthread_detach(i64)
+
+declare extern_weak i32 @pthread_cancel(i64)
+
+declare extern_weak i32 @sched_yield()
+
+declare extern_weak i32 @pthread_mutex_lock(%union.pthread_mutex_t*)
+
+declare extern_weak i32 @pthread_mutex_trylock(%union.pthread_mutex_t*)
+
+declare extern_weak i32 @pthread_mutex_timedlock(%union.pthread_mutex_t*, %struct.timespec*)
+
+declare extern_weak i32 @pthread_mutex_unlock(%union.pthread_mutex_t*)
+
+declare extern_weak i32 @pthread_mutex_init(%union.pthread_mutex_t*, %union.pthread_mutexattr_t*)
+
+declare extern_weak i32 @pthread_mutex_destroy(%union.pthread_mutex_t*)
+
+declare extern_weak i32 @pthread_cond_broadcast(%union.pthread_cond_t*)
+
+declare extern_weak i32 @pthread_cond_signal(%union.pthread_cond_t*)
+
+declare extern_weak i32 @pthread_cond_wait(%union.pthread_cond_t*, %union.pthread_mutex_t*)
+
+declare extern_weak i32 @pthread_cond_timedwait(%union.pthread_cond_t*, %union.pthread_mutex_t*, %struct.timespec*)
+
+declare extern_weak i32 @pthread_cond_destroy(%union.pthread_cond_t*)
+
+declare extern_weak i32 @pthread_key_create(i32*, void (i8*)*)
+
+declare extern_weak i32 @pthread_key_delete(i32)
+
+declare extern_weak i32 @pthread_mutexattr_init(%union.pthread_mutexattr_t*)
+
+declare extern_weak i32 @pthread_mutexattr_settype(%union.pthread_mutexattr_t*, i32)
+
+declare extern_weak i32 @pthread_mutexattr_destroy(%union.pthread_mutexattr_t*)
+
+declare void @_GLOBAL__sub_I__ZN10BitBoard64coEv() nounwind uwtable
Added: llvm/trunk/test/Linker/2011-08-22-ResolveAlias2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2011-08-22-ResolveAlias2.ll?rev=138231&view=auto
==============================================================================
--- llvm/trunk/test/Linker/2011-08-22-ResolveAlias2.ll (added)
+++ llvm/trunk/test/Linker/2011-08-22-ResolveAlias2.ll Mon Aug 22 05:32:09 2011
@@ -0,0 +1,92 @@
+; This file is used by 2011-08-22-ResolveAlias.ll
+; RUN: true
+
+%struct.HexxagonBoard = type { %struct.BitBoard64, %struct.BitBoard64 }
+%struct.BitBoard64 = type { i32, i32 }
+%union.pthread_attr_t = type { [56 x i8] }
+%union.pthread_mutex_t = type { [40 x i8] }
+%struct.timespec = type { i64, i64 }
+%union.pthread_mutexattr_t = type { [4 x i8] }
+%union.pthread_cond_t = type { [48 x i8] }
+
+ at _ZN13HexxagonBoardC1ERKS_ = alias void (%struct.HexxagonBoard*, %struct.HexxagonBoard*)* @_ZN13HexxagonBoardC2ERKS_
+ at _ZL20__gthrw_pthread_oncePiPFvvE = alias weak i32 (i32*, void ()*)* @pthread_once
+ at _ZL27__gthrw_pthread_getspecificj = alias weak i8* (i32)* @pthread_getspecific
+ at _ZL27__gthrw_pthread_setspecificjPKv = alias weak i32 (i32, i8*)* @pthread_setspecific
+ at _ZL22__gthrw_pthread_createPmPK14pthread_attr_tPFPvS3_ES3_ = alias weak i32 (i64*, %union.pthread_attr_t*, i8* (i8*)*, i8*)* @pthread_create
+ at _ZL20__gthrw_pthread_joinmPPv = alias weak i32 (i64, i8**)* @pthread_join
+ at _ZL21__gthrw_pthread_equalmm = alias weak i32 (i64, i64)* @pthread_equal
+ at _ZL20__gthrw_pthread_selfv = alias weak i64 ()* @pthread_self
+ at _ZL22__gthrw_pthread_detachm = alias weak i32 (i64)* @pthread_detach
+ at _ZL22__gthrw_pthread_cancelm = alias weak i32 (i64)* @pthread_cancel
+ at _ZL19__gthrw_sched_yieldv = alias weak i32 ()* @sched_yield
+ at _ZL26__gthrw_pthread_mutex_lockP15pthread_mutex_t = alias weak i32 (%union.pthread_mutex_t*)* @pthread_mutex_lock
+ at _ZL29__gthrw_pthread_mutex_trylockP15pthread_mutex_t = alias weak i32 (%union.pthread_mutex_t*)* @pthread_mutex_trylock
+ at _ZL31__gthrw_pthread_mutex_timedlockP15pthread_mutex_tPK8timespec = alias weak i32 (%union.pthread_mutex_t*, %struct.timespec*)* @pthread_mutex_timedlock
+ at _ZL28__gthrw_pthread_mutex_unlockP15pthread_mutex_t = alias weak i32 (%union.pthread_mutex_t*)* @pthread_mutex_unlock
+ at _ZL26__gthrw_pthread_mutex_initP15pthread_mutex_tPK19pthread_mutexattr_t = alias weak i32 (%union.pthread_mutex_t*, %union.pthread_mutexattr_t*)* @pthread_mutex_init
+ at _ZL29__gthrw_pthread_mutex_destroyP15pthread_mutex_t = alias weak i32 (%union.pthread_mutex_t*)* @pthread_mutex_destroy
+ at _ZL30__gthrw_pthread_cond_broadcastP14pthread_cond_t = alias weak i32 (%union.pthread_cond_t*)* @pthread_cond_broadcast
+ at _ZL27__gthrw_pthread_cond_signalP14pthread_cond_t = alias weak i32 (%union.pthread_cond_t*)* @pthread_cond_signal
+ at _ZL25__gthrw_pthread_cond_waitP14pthread_cond_tP15pthread_mutex_t = alias weak i32 (%union.pthread_cond_t*, %union.pthread_mutex_t*)* @pthread_cond_wait
+ at _ZL30__gthrw_pthread_cond_timedwaitP14pthread_cond_tP15pthread_mutex_tPK8timespec = alias weak i32 (%union.pthread_cond_t*, %union.pthread_mutex_t*, %struct.timespec*)* @pthread_cond_timedwait
+ at _ZL28__gthrw_pthread_cond_destroyP14pthread_cond_t = alias weak i32 (%union.pthread_cond_t*)* @pthread_cond_destroy
+ at _ZL26__gthrw_pthread_key_createPjPFvPvE = alias weak i32 (i32*, void (i8*)*)* @pthread_key_create
+ at _ZL26__gthrw_pthread_key_deletej = alias weak i32 (i32)* @pthread_key_delete
+ at _ZL30__gthrw_pthread_mutexattr_initP19pthread_mutexattr_t = alias weak i32 (%union.pthread_mutexattr_t*)* @pthread_mutexattr_init
+ at _ZL33__gthrw_pthread_mutexattr_settypeP19pthread_mutexattr_ti = alias weak i32 (%union.pthread_mutexattr_t*, i32)* @pthread_mutexattr_settype
+ at _ZL33__gthrw_pthread_mutexattr_destroyP19pthread_mutexattr_t = alias weak i32 (%union.pthread_mutexattr_t*)* @pthread_mutexattr_destroy
+
+declare void @_ZN13HexxagonBoardC2ERKS_(%struct.HexxagonBoard*, %struct.HexxagonBoard*) uwtable align 2
+
+declare extern_weak i32 @pthread_once(i32*, void ()*)
+
+declare extern_weak i8* @pthread_getspecific(i32)
+
+declare extern_weak i32 @pthread_setspecific(i32, i8*)
+
+declare extern_weak i32 @pthread_create(i64*, %union.pthread_attr_t*, i8* (i8*)*, i8*)
+
+declare extern_weak i32 @pthread_join(i64, i8**)
+
+declare extern_weak i32 @pthread_equal(i64, i64)
+
+declare extern_weak i64 @pthread_self()
+
+declare extern_weak i32 @pthread_detach(i64)
+
+declare extern_weak i32 @pthread_cancel(i64)
+
+declare extern_weak i32 @sched_yield()
+
+declare extern_weak i32 @pthread_mutex_lock(%union.pthread_mutex_t*)
+
+declare extern_weak i32 @pthread_mutex_trylock(%union.pthread_mutex_t*)
+
+declare extern_weak i32 @pthread_mutex_timedlock(%union.pthread_mutex_t*, %struct.timespec*)
+
+declare extern_weak i32 @pthread_mutex_unlock(%union.pthread_mutex_t*)
+
+declare extern_weak i32 @pthread_mutex_init(%union.pthread_mutex_t*, %union.pthread_mutexattr_t*)
+
+declare extern_weak i32 @pthread_mutex_destroy(%union.pthread_mutex_t*)
+
+declare extern_weak i32 @pthread_cond_broadcast(%union.pthread_cond_t*)
+
+declare extern_weak i32 @pthread_cond_signal(%union.pthread_cond_t*)
+
+declare extern_weak i32 @pthread_cond_wait(%union.pthread_cond_t*, %union.pthread_mutex_t*)
+
+declare extern_weak i32 @pthread_cond_timedwait(%union.pthread_cond_t*, %union.pthread_mutex_t*, %struct.timespec*)
+
+declare extern_weak i32 @pthread_cond_destroy(%union.pthread_cond_t*)
+
+declare extern_weak i32 @pthread_key_create(i32*, void (i8*)*)
+
+declare extern_weak i32 @pthread_key_delete(i32)
+
+declare extern_weak i32 @pthread_mutexattr_init(%union.pthread_mutexattr_t*)
+
+declare extern_weak i32 @pthread_mutexattr_settype(%union.pthread_mutexattr_t*, i32)
+
+declare extern_weak i32 @pthread_mutexattr_destroy(%union.pthread_mutexattr_t*)
From wdietz2 at illinois.edu Mon Aug 22 09:59:14 2011
From: wdietz2 at illinois.edu (Will Dietz)
Date: Mon, 22 Aug 2011 14:59:14 -0000
Subject: [llvm-commits] [poolalloc] r138233 - /poolalloc/trunk/test/Makefile
Message-ID: <20110822145914.92D7E2A6C12C@llvm.org>
Author: wdietz2
Date: Mon Aug 22 09:59:14 2011
New Revision: 138233
URL: http://llvm.org/viewvc/llvm-project?rev=138233&view=rev
Log:
test/Makefile: Update shared library definitions drop lib- prefix.
This naming convention change is because we're building
them as loadable modules now.
Modified:
poolalloc/trunk/test/Makefile
Modified: poolalloc/trunk/test/Makefile
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/Makefile?rev=138233&r1=138232&r2=138233&view=diff
==============================================================================
--- poolalloc/trunk/test/Makefile (original)
+++ poolalloc/trunk/test/Makefile Mon Aug 22 09:59:14 2011
@@ -409,11 +409,11 @@
# Pathname to poolalloc object tree
PADIR := $(PROJ_OBJ_ROOT)
# Pathame to the DSA pass dynamic library
-DSA_SO := $(PADIR)/$(BuildMode)/lib/libLLVMDataStructure$(SHLIBEXT)
+DSA_SO := $(PADIR)/$(BuildMode)/lib/LLVMDataStructure$(SHLIBEXT)
# Pathame to the Assist DSA pass dynamic library
-ADSA_SO := $(PADIR)/$(BuildMode)/lib/libAssistDS$(SHLIBEXT)
+ADSA_SO := $(PADIR)/$(BuildMode)/lib/AssistDS$(SHLIBEXT)
# Pathname to the PA pass dynamic library
-PA_SO := $(PADIR)/$(BuildMode)/lib/libpoolalloc$(SHLIBEXT)
+PA_SO := $(PADIR)/$(BuildMode)/lib/poolalloc$(SHLIBEXT)
DSAOPT := $(PROJ_OBJ_ROOT)/test/tools/dsaopt
ADSAOPT := $(PROJ_OBJ_ROOT)/test/tools/adsaopt
From rdivacky at freebsd.org Mon Aug 22 11:57:23 2011
From: rdivacky at freebsd.org (Roman Divacky)
Date: Mon, 22 Aug 2011 18:57:23 +0200
Subject: [llvm-commits] [PATCH]: dont crash when printing PPC::MFCRpseudo
comment
Message-ID: <20110822165723.GA38194@freebsd.org>
Hi,
on PPC the MFCRpseudo instruction has 1 operand but the printer incorrectly
tries to print the second operand as a comment, this patch fixes it:
Index: PPCAsmPrinter.cpp
===================================================================
--- PPCAsmPrinter.cpp (revision 138231)
+++ PPCAsmPrinter.cpp (working copy)
@@ -369,7 +369,7 @@
// Transform: %R3 = MFCRpseud %CR7
// Into: %R3 = MFCR ;; cr7
OutStreamer.AddComment(PPCInstPrinter::
- getRegisterName(MI->getOperand(1).getReg()));
+ getRegisterName(MI->getOperand(0).getReg()));
TmpInst.setOpcode(PPC::MFCR);
TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(0).getReg()));
OutStreamer.EmitInstruction(TmpInst);
OK to commit?
roman
From rdivacky at freebsd.org Mon Aug 22 12:26:27 2011
From: rdivacky at freebsd.org (Roman Divacky)
Date: Mon, 22 Aug 2011 19:26:27 +0200
Subject: [llvm-commits] [PATCH]: dont crash when printing
PPC::MFCRpseudo comment
In-Reply-To: <20110822165723.GA38194@freebsd.org>
References: <20110822165723.GA38194@freebsd.org>
Message-ID: <20110822172627.GA41572@freebsd.org>
sorry, the patch is completely wrong. I apology for the noise :(
On Mon, Aug 22, 2011 at 06:57:23PM +0200, Roman Divacky wrote:
> Hi,
>
> on PPC the MFCRpseudo instruction has 1 operand but the printer incorrectly
> tries to print the second operand as a comment, this patch fixes it:
>
> Index: PPCAsmPrinter.cpp
> ===================================================================
> --- PPCAsmPrinter.cpp (revision 138231)
> +++ PPCAsmPrinter.cpp (working copy)
> @@ -369,7 +369,7 @@
> // Transform: %R3 = MFCRpseud %CR7
> // Into: %R3 = MFCR ;; cr7
> OutStreamer.AddComment(PPCInstPrinter::
> - getRegisterName(MI->getOperand(1).getReg()));
> + getRegisterName(MI->getOperand(0).getReg()));
> TmpInst.setOpcode(PPC::MFCR);
> TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(0).getReg()));
> OutStreamer.EmitInstruction(TmpInst);
>
>
> OK to commit?
>
> roman
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
From gohman at apple.com Mon Aug 22 12:27:03 2011
From: gohman at apple.com (Dan Gohman)
Date: Mon, 22 Aug 2011 17:27:03 -0000
Subject: [llvm-commits] [llvm] r138241 -
/llvm/trunk/test/Transforms/ObjCARC/basic.ll
Message-ID: <20110822172703.260BC2A6C12C@llvm.org>
Author: djg
Date: Mon Aug 22 12:27:02 2011
New Revision: 138241
URL: http://llvm.org/viewvc/llvm-project?rev=138241&view=rev
Log:
Make a few tests slightly more strict.
Modified:
llvm/trunk/test/Transforms/ObjCARC/basic.ll
Modified: llvm/trunk/test/Transforms/ObjCARC/basic.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/basic.ll?rev=138241&r1=138240&r2=138241&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/basic.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/basic.ll Mon Aug 22 12:27:02 2011
@@ -353,13 +353,14 @@
; CHECK: define void @test10(
; CHECK: @objc_retain(i8* %x)
+; CHECK: @callee
; CHECK: @use_pointer
; CHECK: @objc_release
; CHECK: }
define void @test10(i8* %x) nounwind {
entry:
%0 = call i8* @objc_retain(i8* %x) nounwind
- call void @use_pointer(i8* %x)
+ call void @callee()
call void @use_pointer(i8* %x)
call void @objc_release(i8* %0) nounwind
ret void
@@ -768,7 +769,7 @@
define void @test23b(i8* %p) {
entry:
%0 = call i8* @objc_retainBlock(i8* %p) nounwind
- call void @use_pointer(i8* %p)
+ call void @callee()
call void @use_pointer(i8* %p)
call void @objc_release(i8* %p) nounwind
ret void
From gohman at apple.com Mon Aug 22 12:29:11 2011
From: gohman at apple.com (Dan Gohman)
Date: Mon, 22 Aug 2011 17:29:11 -0000
Subject: [llvm-commits] [llvm] r138242 - in /llvm/trunk:
lib/Transforms/Scalar/ObjCARC.cpp test/Transforms/ObjCARC/basic.ll
Message-ID: <20110822172911.4D8F82A6C12C@llvm.org>
Author: djg
Date: Mon Aug 22 12:29:11 2011
New Revision: 138242
URL: http://llvm.org/viewvc/llvm-project?rev=138242&view=rev
Log:
Constant pointers to objects don't need reference counting.
Modified:
llvm/trunk/lib/Transforms/Scalar/ObjCARC.cpp
llvm/trunk/test/Transforms/ObjCARC/basic.ll
Modified: llvm/trunk/lib/Transforms/Scalar/ObjCARC.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/ObjCARC.cpp?rev=138242&r1=138241&r2=138242&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/ObjCARC.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/ObjCARC.cpp Mon Aug 22 12:29:11 2011
@@ -515,6 +515,10 @@
const Value *Pointer =
StripPointerCastsAndObjCCalls(LI->getPointerOperand());
if (const GlobalVariable *GV = dyn_cast(Pointer)) {
+ // A constant pointer can't be pointing to an object on the heap. It may
+ // be reference-counted, but it won't be deleted.
+ if (GV->isConstant())
+ return true;
StringRef Name = GV->getName();
// These special variables are known to hold values which are not
// reference-counted pointers.
@@ -2744,6 +2748,15 @@
// regardless of what possible decrements or uses lie between them.
bool KnownSafe = isa(Arg) || isa(Arg);
+ // A constant pointer can't be pointing to an object on the heap. It may
+ // be reference-counted, but it won't be deleted.
+ if (const LoadInst *LI = dyn_cast(Arg))
+ if (const GlobalVariable *GV =
+ dyn_cast(
+ StripPointerCastsAndObjCCalls(LI->getPointerOperand())))
+ if (GV->isConstant())
+ KnownSafe = true;
+
// If a pair happens in a region where it is known that the reference count
// is already incremented, we can similarly ignore possible decrements.
bool KnownSafeTD = true, KnownSafeBU = true;
Modified: llvm/trunk/test/Transforms/ObjCARC/basic.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ObjCARC/basic.ll?rev=138242&r1=138241&r2=138242&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ObjCARC/basic.ll (original)
+++ llvm/trunk/test/Transforms/ObjCARC/basic.ll Mon Aug 22 12:29:11 2011
@@ -1638,6 +1638,39 @@
ret void
}
+; Constant pointers to objects don't need reference counting.
+
+ at constptr = external constant i8*
+ at something = external global i8*
+
+; CHECK: define void @test60(
+; CHECK-NOT: @objc_
+; CHECK: }
+define void @test60() {
+ %t = load i8** @constptr
+ %s = load i8** @something
+ call i8* @objc_retain(i8* %s)
+ call void @callee()
+ call void @use_pointer(i8* %t)
+ call void @objc_release(i8* %s)
+ ret void
+}
+
+; Constant pointers to objects don't need to be considered related to other
+; pointers.
+
+; CHECK: define void @test61(
+; CHECK-NOT: @objc_
+; CHECK: }
+define void @test61() {
+ %t = load i8** @constptr
+ call i8* @objc_retain(i8* %t)
+ call void @callee()
+ call void @use_pointer(i8* %t)
+ call void @objc_release(i8* %t)
+ ret void
+}
+
declare void @bar(i32 ()*)
; A few real-world testcases.
From gohman at apple.com Mon Aug 22 12:29:38 2011
From: gohman at apple.com (Dan Gohman)
Date: Mon, 22 Aug 2011 17:29:38 -0000
Subject: [llvm-commits] [llvm] r138243 -
/llvm/trunk/lib/Transforms/Scalar/ObjCARC.cpp
Message-ID: <20110822172938.0E8582A6C12C@llvm.org>
Author: djg
Date: Mon Aug 22 12:29:37 2011
New Revision: 138243
URL: http://llvm.org/viewvc/llvm-project?rev=138243&view=rev
Log:
Add a comment.
Modified:
llvm/trunk/lib/Transforms/Scalar/ObjCARC.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/ObjCARC.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/ObjCARC.cpp?rev=138243&r1=138242&r2=138243&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/ObjCARC.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/ObjCARC.cpp Mon Aug 22 12:29:37 2011
@@ -344,6 +344,10 @@
break;
default:
// For anything else, check all the operands.
+ // Note that this includes both operands of a Store: while the first
+ // operand isn't actually being dereferenced, it is being stored to
+ // memory where we can no longer track who might read it and dereference
+ // it, so we have to consider it potentially used.
for (User::const_op_iterator OI = I->op_begin(), OE = I->op_end();
OI != OE; ++OI)
if (IsPotentialUse(*OI))
From grosbach at apple.com Mon Aug 22 12:41:44 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 22 Aug 2011 17:41:44 -0000
Subject: [llvm-commits] [llvm] r138245 -
/llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
Message-ID: <20110822174144.98C362A6C12C@llvm.org>
Author: grosbach
Date: Mon Aug 22 12:41:44 2011
New Revision: 138245
URL: http://llvm.org/viewvc/llvm-project?rev=138245&view=rev
Log:
Thumb assembly parsing and encoding for ORR.
Modified:
llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
Modified: llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/basic-thumb-instructions.s?rev=138245&r1=138244&r2=138245&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/basic-thumb-instructions.s (original)
+++ llvm/trunk/test/MC/ARM/basic-thumb-instructions.s Mon Aug 22 12:41:44 2011
@@ -355,3 +355,11 @@
nop
@ CHECK: nop @ encoding: [0xc0,0x46]
+
+
+ at ------------------------------------------------------------------------------
+@ ORR
+ at ------------------------------------------------------------------------------
+ orrs r3, r4
+
+@ CHECK-ERRORS: orrs r3, r4 @ encoding: [0x23,0x43]
From resistor at mac.com Mon Aug 22 12:56:58 2011
From: resistor at mac.com (Owen Anderson)
Date: Mon, 22 Aug 2011 17:56:58 -0000
Subject: [llvm-commits] [llvm] r138246 - in /llvm/trunk:
lib/Target/ARM/Disassembler/ARMDisassembler.cpp
test/MC/Disassembler/ARM/thumb1.txt
Message-ID: <20110822175658.964D32A6C12C@llvm.org>
Author: resistor
Date: Mon Aug 22 12:56:58 2011
New Revision: 138246
URL: http://llvm.org/viewvc/llvm-project?rev=138246&view=rev
Log:
Fix an incorrect shift when decoding SP-relative stores in Thumb1-mode. Add more tests.
Modified:
llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
llvm/trunk/test/MC/Disassembler/ARM/thumb1.txt
Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp?rev=138246&r1=138245&r2=138246&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp (original)
+++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp Mon Aug 22 12:56:58 2011
@@ -2322,7 +2322,7 @@
static DecodeStatus DecodeThumbAddrModeSP(llvm::MCInst &Inst, unsigned Val,
uint64_t Address, const void *Decoder) {
Inst.addOperand(MCOperand::CreateReg(ARM::SP));
- Inst.addOperand(MCOperand::CreateImm(Val << 2));
+ Inst.addOperand(MCOperand::CreateImm(Val));
return Success;
}
Modified: llvm/trunk/test/MC/Disassembler/ARM/thumb1.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/thumb1.txt?rev=138246&r1=138245&r2=138246&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/ARM/thumb1.txt (original)
+++ llvm/trunk/test/MC/Disassembler/ARM/thumb1.txt Mon Aug 22 12:56:58 2011
@@ -101,3 +101,33 @@
0x6c 0x40
+#------------------------------------------------------------------------------
+# LDM
+#------------------------------------------------------------------------------
+# CHECK: ldm r3, {r0, r1, r2, r3, r4, r5, r6, r7}
+# CHECK: ldm r2!, {r1, r3, r4, r5, r7}
+# CHECK: ldm r1, {r1}
+
+0xff 0xcb
+0xba 0xca
+0x02 0xc9
+
+
+#------------------------------------------------------------------------------
+# LDR (immediate)
+#------------------------------------------------------------------------------
+# CHECK: ldr r1, [r5]
+# CHECK: ldr r2, [r6, #32]
+# CHECK: ldr r3, [r7, #124]
+# CHECK: ldr r1, [sp]
+# CHECK: ldr r2, [sp, #24]
+# CHECK: ldr r3, [sp, #1020]
+
+
+0x29 0x68
+0x32 0x6a
+0xfb 0x6f
+0x00 0x99
+0x06 0x9a
+0xff 0x9b
+
From grosbach at apple.com Mon Aug 22 13:04:24 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 22 Aug 2011 18:04:24 -0000
Subject: [llvm-commits] [llvm] r138249 - in /llvm/trunk/lib/Target/ARM:
ARMInstrFormats.td ARMInstrInfo.td ARMInstrThumb.td ARMInstrThumb2.td
Message-ID: <20110822180424.82ABF2A6C12C@llvm.org>
Author: grosbach
Date: Mon Aug 22 13:04:24 2011
New Revision: 138249
URL: http://llvm.org/viewvc/llvm-project?rev=138249&view=rev
Log:
Clean up predicates on ARM target instruction aliases.
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrFormats.td
llvm/trunk/lib/Target/ARM/ARMInstrInfo.td
llvm/trunk/lib/Target/ARM/ARMInstrThumb.td
llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
Modified: llvm/trunk/lib/Target/ARM/ARMInstrFormats.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrFormats.td?rev=138249&r1=138248&r2=138249&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrFormats.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrFormats.td Mon Aug 22 13:04:24 2011
@@ -219,9 +219,20 @@
}
//===----------------------------------------------------------------------===//
+// ARM Assembler alias templates.
+//
+class ARMInstAlias
+ : InstAlias, Requires<[IsARM]>;
+class tInstAlias
+ : InstAlias, Requires<[IsThumb]>;
+class t2InstAlias
+ : InstAlias, Requires<[IsThumb2]>;
+
+//===----------------------------------------------------------------------===//
// ARM Instruction templates.
//
+
class InstTemplate
: Instruction {
Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=138249&r1=138248&r2=138249&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Mon Aug 22 13:04:24 2011
@@ -4751,75 +4751,71 @@
// PKHBT/PKHTB with default shift amount. PKHTB is equivalent to PKHBT when the
// shift amount is zero (i.e., unspecified).
def : InstAlias<"pkhbt${p} $Rd, $Rn, $Rm",
- (PKHBT GPR:$Rd, GPR:$Rn, GPR:$Rm, 0, pred:$p)>;
+ (PKHBT GPR:$Rd, GPR:$Rn, GPR:$Rm, 0, pred:$p)>,
+ Requires<[IsARM, HasV6]>;
def : InstAlias<"pkhtb${p} $Rd, $Rn, $Rm",
- (PKHBT GPR:$Rd, GPR:$Rn, GPR:$Rm, 0, pred:$p)>;
+ (PKHBT GPR:$Rd, GPR:$Rn, GPR:$Rm, 0, pred:$p)>,
+ Requires<[IsARM, HasV6]>;
// PUSH/POP aliases for STM/LDM
-def : InstAlias<"push${p} $regs",
- (STMDB_UPD SP, pred:$p, reglist:$regs)>;
-def : InstAlias<"pop${p} $regs",
- (LDMIA_UPD SP, pred:$p, reglist:$regs)>;
+def : ARMInstAlias<"push${p} $regs", (STMDB_UPD SP, pred:$p, reglist:$regs)>;
+def : ARMInstAlias<"pop${p} $regs", (LDMIA_UPD SP, pred:$p, reglist:$regs)>;
// RSB two-operand forms (optional explicit destination operand)
-def : InstAlias<"rsb${s}${p} $Rdn, $imm",
- (RSBri GPR:$Rdn, GPR:$Rdn, so_imm:$imm, pred:$p, cc_out:$s)>,
- Requires<[IsARM]>;
-def : InstAlias<"rsb${s}${p} $Rdn, $Rm",
- (RSBrr GPR:$Rdn, GPR:$Rdn, GPR:$Rm, pred:$p, cc_out:$s)>,
- Requires<[IsARM]>;
-def : InstAlias<"rsb${s}${p} $Rdn, $shift",
+def : ARMInstAlias<"rsb${s}${p} $Rdn, $imm",
+ (RSBri GPR:$Rdn, GPR:$Rdn, so_imm:$imm, pred:$p, cc_out:$s)>;
+def : ARMInstAlias<"rsb${s}${p} $Rdn, $Rm",
+ (RSBrr GPR:$Rdn, GPR:$Rdn, GPR:$Rm, pred:$p, cc_out:$s)>;
+def : ARMInstAlias<"rsb${s}${p} $Rdn, $shift",
(RSBrsi GPR:$Rdn, GPR:$Rdn, so_reg_imm:$shift, pred:$p,
- cc_out:$s)>, Requires<[IsARM]>;
-def : InstAlias<"rsb${s}${p} $Rdn, $shift",
+ cc_out:$s)>;
+def : ARMInstAlias<"rsb${s}${p} $Rdn, $shift",
(RSBrsr GPR:$Rdn, GPR:$Rdn, so_reg_reg:$shift, pred:$p,
- cc_out:$s)>, Requires<[IsARM]>;
+ cc_out:$s)>;
// RSC two-operand forms (optional explicit destination operand)
-def : InstAlias<"rsc${s}${p} $Rdn, $imm",
- (RSCri GPR:$Rdn, GPR:$Rdn, so_imm:$imm, pred:$p, cc_out:$s)>,
- Requires<[IsARM]>;
-def : InstAlias<"rsc${s}${p} $Rdn, $Rm",
- (RSCrr GPR:$Rdn, GPR:$Rdn, GPR:$Rm, pred:$p, cc_out:$s)>,
- Requires<[IsARM]>;
-def : InstAlias<"rsc${s}${p} $Rdn, $shift",
+def : ARMInstAlias<"rsc${s}${p} $Rdn, $imm",
+ (RSCri GPR:$Rdn, GPR:$Rdn, so_imm:$imm, pred:$p, cc_out:$s)>;
+def : ARMInstAlias<"rsc${s}${p} $Rdn, $Rm",
+ (RSCrr GPR:$Rdn, GPR:$Rdn, GPR:$Rm, pred:$p, cc_out:$s)>;
+def : ARMInstAlias<"rsc${s}${p} $Rdn, $shift",
(RSCrsi GPR:$Rdn, GPR:$Rdn, so_reg_imm:$shift, pred:$p,
- cc_out:$s)>, Requires<[IsARM]>;
-def : InstAlias<"rsc${s}${p} $Rdn, $shift",
+ cc_out:$s)>;
+def : ARMInstAlias<"rsc${s}${p} $Rdn, $shift",
(RSCrsr GPR:$Rdn, GPR:$Rdn, so_reg_reg:$shift, pred:$p,
- cc_out:$s)>, Requires<[IsARM]>;
+ cc_out:$s)>;
// SSAT/USAT optional shift operand.
-def : InstAlias<"ssat${p} $Rd, $sat_imm, $Rn",
+def : ARMInstAlias<"ssat${p} $Rd, $sat_imm, $Rn",
(SSAT GPRnopc:$Rd, imm1_32:$sat_imm, GPRnopc:$Rn, 0, pred:$p)>;
-def : InstAlias<"usat${p} $Rd, $sat_imm, $Rn",
+def : ARMInstAlias<"usat${p} $Rd, $sat_imm, $Rn",
(USAT GPRnopc:$Rd, imm0_31:$sat_imm, GPRnopc:$Rn, 0, pred:$p)>;
// Extend instruction optional rotate operand.
-def : InstAlias<"sxtab${p} $Rd, $Rn, $Rm",
+def : ARMInstAlias<"sxtab${p} $Rd, $Rn, $Rm",
(SXTAB GPRnopc:$Rd, GPR:$Rn, GPRnopc:$Rm, 0, pred:$p)>;
-def : InstAlias<"sxtah${p} $Rd, $Rn, $Rm",
+def : ARMInstAlias<"sxtah${p} $Rd, $Rn, $Rm",
(SXTAH GPRnopc:$Rd, GPR:$Rn, GPRnopc:$Rm, 0, pred:$p)>;
-def : InstAlias<"sxtab16${p} $Rd, $Rn, $Rm",
+def : ARMInstAlias<"sxtab16${p} $Rd, $Rn, $Rm",
(SXTAB16 GPRnopc:$Rd, GPR:$Rn, GPRnopc:$Rm, 0, pred:$p)>;
-def : InstAlias<"sxtb${p} $Rd, $Rm",
+def : ARMInstAlias<"sxtb${p} $Rd, $Rm",
(SXTB GPRnopc:$Rd, GPRnopc:$Rm, 0, pred:$p)>;
-def : InstAlias<"sxtb16${p} $Rd, $Rm",
+def : ARMInstAlias<"sxtb16${p} $Rd, $Rm",
(SXTB16 GPRnopc:$Rd, GPRnopc:$Rm, 0, pred:$p)>;
-def : InstAlias<"sxth${p} $Rd, $Rm",
+def : ARMInstAlias<"sxth${p} $Rd, $Rm",
(SXTH GPRnopc:$Rd, GPRnopc:$Rm, 0, pred:$p)>;
-def : InstAlias<"uxtab${p} $Rd, $Rn, $Rm",
+def : ARMInstAlias<"uxtab${p} $Rd, $Rn, $Rm",
(UXTAB GPRnopc:$Rd, GPR:$Rn, GPRnopc:$Rm, 0, pred:$p)>;
-def : InstAlias<"uxtah${p} $Rd, $Rn, $Rm",
+def : ARMInstAlias<"uxtah${p} $Rd, $Rn, $Rm",
(UXTAH GPRnopc:$Rd, GPR:$Rn, GPRnopc:$Rm, 0, pred:$p)>;
-def : InstAlias<"uxtab16${p} $Rd, $Rn, $Rm",
+def : ARMInstAlias<"uxtab16${p} $Rd, $Rn, $Rm",
(UXTAB16 GPRnopc:$Rd, GPR:$Rn, GPRnopc:$Rm, 0, pred:$p)>;
-def : InstAlias<"uxtb${p} $Rd, $Rm",
+def : ARMInstAlias<"uxtb${p} $Rd, $Rm",
(UXTB GPRnopc:$Rd, GPRnopc:$Rm, 0, pred:$p)>;
-def : InstAlias<"uxtb16${p} $Rd, $Rm",
+def : ARMInstAlias<"uxtb16${p} $Rd, $Rm",
(UXTB16 GPRnopc:$Rd, GPRnopc:$Rm, 0, pred:$p)>;
-def : InstAlias<"uxth${p} $Rd, $Rm",
+def : ARMInstAlias<"uxth${p} $Rd, $Rm",
(UXTH GPRnopc:$Rd, GPRnopc:$Rm, 0, pred:$p)>;
Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb.td?rev=138249&r1=138248&r2=138249&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrThumb.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Mon Aug 22 13:04:24 2011
@@ -1017,9 +1017,8 @@
}
// Because we have an explicit tMOVSr below, we need an alias to handle
// the immediate "movs" form here. Blech.
-def : InstAlias <"movs $Rdn, $imm",
- (tMOVi8 tGPR:$Rdn, CPSR, imm0_255:$imm, 14, 0)>,
- Requires<[IsThumb]>;
+def : tInstAlias <"movs $Rdn, $imm",
+ (tMOVi8 tGPR:$Rdn, CPSR, imm0_255:$imm, 14, 0)>;
// A7-73: MOV(2) - mov setting flag.
@@ -1061,9 +1060,8 @@
let AsmMatchConverter = "cvtThumbMultiply";
}
-def : InstAlias<"mul${s}${p} $Rdm, $Rn", (tMUL tGPR:$Rdm, s_cc_out:$s, tGPR:$Rn,
- pred:$p)>,
- Requires<[IsThumb]>;
+def :tInstAlias<"mul${s}${p} $Rdm, $Rn", (tMUL tGPR:$Rdm, s_cc_out:$s, tGPR:$Rn,
+ pred:$p)>;
// Move inverse register
def tMVN : // A8.6.107
@@ -1115,9 +1113,8 @@
"rsb", "\t$Rd, $Rn, #0",
[(set tGPR:$Rd, (ineg tGPR:$Rn))]>;
-def : InstAlias<"neg${s}${p} $Rd, $Rm",
- (tRSB tGPR:$Rd, s_cc_out:$s, tGPR:$Rm, pred:$p)>,
- Requires<[IsThumb]>;
+def : tInstAlias<"neg${s}${p} $Rd, $Rm",
+ (tRSB tGPR:$Rd, s_cc_out:$s, tGPR:$Rm, pred:$p)>;
// Subtract with carry register
let Uses = [CPSR] in
Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=138249&r1=138248&r2=138249&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Mon Aug 22 13:04:24 2011
@@ -504,21 +504,18 @@
}
// Assembly aliases for optional destination operand when it's the same
// as the source operand.
- def : InstAlias(!strconcat(baseOpc, "ri")) rGPR:$Rdn, rGPR:$Rdn,
t2_so_imm:$imm, pred:$p,
- cc_out:$s)>,
- Requires<[IsThumb2]>;
- def : InstAlias;
+ def : t2InstAlias(!strconcat(baseOpc, "rr")) rGPR:$Rdn, rGPR:$Rdn,
rGPR:$Rm, pred:$p,
- cc_out:$s)>,
- Requires<[IsThumb2]>;
- def : InstAlias;
+ def : t2InstAlias(!strconcat(baseOpc, "rs")) rGPR:$Rdn, rGPR:$Rdn,
t2_so_reg:$shift, pred:$p,
- cc_out:$s)>,
- Requires<[IsThumb2]>;
+ cc_out:$s)>;
}
/// T2I_bin_w_irs - Same as T2I_bin_irs except these operations need
@@ -1557,9 +1554,8 @@
let Inst{15} = 0;
}
-def : InstAlias<"mov${s}${p} $Rd, $imm", (t2MOVi rGPR:$Rd, t2_so_imm:$imm,
- pred:$p, cc_out:$s)>,
- Requires<[IsThumb2]>;
+def : t2InstAlias<"mov${s}${p} $Rd, $imm", (t2MOVi rGPR:$Rd, t2_so_imm:$imm,
+ pred:$p, cc_out:$s)>;
let isReMaterializable = 1, isAsCheapAsAMove = 1, isMoveImm = 1 in
def t2MOVi16 : T2I<(outs rGPR:$Rd), (ins imm0_65535_expr:$imm), IIC_iMOVi,
From resistor at mac.com Mon Aug 22 13:05:49 2011
From: resistor at mac.com (Owen Anderson)
Date: Mon, 22 Aug 2011 18:05:49 -0000
Subject: [llvm-commits] [llvm] r138250 -
/llvm/trunk/test/MC/Disassembler/ARM/thumb1.txt
Message-ID: <20110822180549.59B332A6C12C@llvm.org>
Author: resistor
Date: Mon Aug 22 13:05:49 2011
New Revision: 138250
URL: http://llvm.org/viewvc/llvm-project?rev=138250&view=rev
Log:
Port another swathe of Thumb1 encoding tests over to decoding tests.
Modified:
llvm/trunk/test/MC/Disassembler/ARM/thumb1.txt
Modified: llvm/trunk/test/MC/Disassembler/ARM/thumb1.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/thumb1.txt?rev=138250&r1=138249&r2=138250&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/ARM/thumb1.txt (original)
+++ llvm/trunk/test/MC/Disassembler/ARM/thumb1.txt Mon Aug 22 13:05:49 2011
@@ -131,3 +131,156 @@
0x06 0x9a
0xff 0x9b
+#------------------------------------------------------------------------------
+# LDR (register)
+#------------------------------------------------------------------------------
+# CHECK: ldr r1, [r2, r3]
+
+0xd1 0x58
+
+
+#------------------------------------------------------------------------------
+# LDRB (immediate)
+#------------------------------------------------------------------------------
+# CHECK: ldrb r4, [r3]
+# CHECK: ldrb r5, [r6]
+# CHECK: ldrb r6, [r7, #31]
+
+0x1c 0x78
+0x35 0x78
+0xfe 0x7f
+
+
+#------------------------------------------------------------------------------
+# LDRB (register)
+#------------------------------------------------------------------------------
+# CHECK: ldrb r6, [r4, r5]
+
+0x66 0x5d
+
+
+#------------------------------------------------------------------------------
+# LDRH (immediate)
+#------------------------------------------------------------------------------
+# CHECK: ldrh r3, [r3]
+# CHECK: ldrh r4, [r6, #2]
+# CHECK: ldrh r5, [r7, #62]
+
+0x1b 0x88
+0x74 0x88
+0xfd 0x8f
+
+#------------------------------------------------------------------------------
+# LDRH (register)
+#------------------------------------------------------------------------------
+# CHECK: ldrh r6, [r2, r6]
+
+0x96 0x5b
+
+
+#------------------------------------------------------------------------------
+# LDRSB/LDRSH
+#------------------------------------------------------------------------------
+# CHECK: ldrsb r6, [r2, r6]
+# CHECK: ldrsh r3, [r7, r1]
+
+0x96 0x57
+0x7b 0x5e
+
+#------------------------------------------------------------------------------
+# LSL (immediate)
+#------------------------------------------------------------------------------
+# CHECK: movs r4, r5
+# CHECK: lsls r4, r5, #4
+
+0x2c 0x00
+0x2c 0x01
+
+
+#------------------------------------------------------------------------------
+# LSL (register)
+#------------------------------------------------------------------------------
+# CHECK: lsls r2, r6
+
+0xb2 0x40
+
+
+#------------------------------------------------------------------------------
+# LSR (immediate)
+#------------------------------------------------------------------------------
+# CHECK: lsrs r1, r3, #1
+# CHECK: lsrs r1, r3, #32
+
+0x59 0x08
+0x19 0x08
+
+
+#------------------------------------------------------------------------------
+# LSR (register)
+#------------------------------------------------------------------------------
+# CHECK: lsrs r2, r6
+
+0xf2 0x40
+
+#------------------------------------------------------------------------------
+# MOV (immediate)
+#------------------------------------------------------------------------------
+# CHECK: movs r2, #0
+# CHECK: movs r2, #255
+# CHECK: movs r2, #23
+
+0x00 0x22
+0xff 0x22
+0x17 0x22
+
+
+#------------------------------------------------------------------------------
+# MOV (register)
+#------------------------------------------------------------------------------
+# CHECK: mov r3, r4
+# CHECK: movs r1, r3
+
+0x23 0x46
+0x19 0x00
+
+
+#------------------------------------------------------------------------------
+# MUL
+#------------------------------------------------------------------------------
+# CHECK: muls r1, r2, r1
+# CHECK: muls r3, r4
+
+0x51 0x43
+0x63 0x43
+
+
+#------------------------------------------------------------------------------
+# MVN
+#------------------------------------------------------------------------------
+# CHECK: mvns r6, r3
+
+0xde 0x43
+
+#------------------------------------------------------------------------------
+# NEG
+#------------------------------------------------------------------------------
+# CHECK: rsbs r3, r4, #0
+
+0x63 0x42
+
+
+#------------------------------------------------------------------------------
+# NOP
+#------------------------------------------------------------------------------
+# CHECK: nop
+
+0xc0 0x46
+
+
+#------------------------------------------------------------------------------
+# ORR
+#------------------------------------------------------------------------------
+# CHECK: orrs r3, r4
+
+0x23 0x43
+
From resistor at mac.com Mon Aug 22 13:22:06 2011
From: resistor at mac.com (Owen Anderson)
Date: Mon, 22 Aug 2011 18:22:06 -0000
Subject: [llvm-commits] [llvm] r138251 - in /llvm/trunk:
lib/Target/ARM/Disassembler/ARMDisassembler.cpp
test/MC/Disassembler/ARM/neon.txt
Message-ID: <20110822182207.03B702A6C12C@llvm.org>
Author: resistor
Date: Mon Aug 22 13:22:06 2011
New Revision: 138251
URL: http://llvm.org/viewvc/llvm-project?rev=138251&view=rev
Log:
Correct writeback handling of duplicating VLD instructions. Discovered by randomized testing.
Modified:
llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
llvm/trunk/test/MC/Disassembler/ARM/neon.txt
Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp?rev=138251&r1=138250&r2=138251&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp (original)
+++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp Mon Aug 22 13:22:06 2011
@@ -1992,7 +1992,7 @@
if (regs == 2) {
CHECK(S, DecodeDPRRegisterClass(Inst, (Rd+1)%32, Address, Decoder));
}
- if (Rm == 0xD) {
+ if (Rm != 0xF) {
CHECK(S, DecodeGPRRegisterClass(Inst, Rn, Address, Decoder));
}
@@ -2023,7 +2023,7 @@
CHECK(S, DecodeDPRRegisterClass(Inst, Rd, Address, Decoder));
CHECK(S, DecodeDPRRegisterClass(Inst, (Rd+inc)%32, Address, Decoder));
- if (Rm == 0xD) {
+ if (Rm != 0xF) {
CHECK(S, DecodeGPRRegisterClass(Inst, Rn, Address, Decoder));
}
@@ -2052,7 +2052,7 @@
CHECK(S, DecodeDPRRegisterClass(Inst, Rd, Address, Decoder));
CHECK(S, DecodeDPRRegisterClass(Inst, (Rd+inc)%32, Address, Decoder));
CHECK(S, DecodeDPRRegisterClass(Inst, (Rd+2*inc)%32, Address, Decoder));
- if (Rm == 0xD) {
+ if (Rm != 0xF) {
CHECK(S, DecodeGPRRegisterClass(Inst, Rn, Address, Decoder));
}
@@ -2097,7 +2097,7 @@
CHECK(S, DecodeDPRRegisterClass(Inst, (Rd+inc)%32, Address, Decoder));
CHECK(S, DecodeDPRRegisterClass(Inst, (Rd+2*inc)%32, Address, Decoder));
CHECK(S, DecodeDPRRegisterClass(Inst, (Rd+3*inc)%32, Address, Decoder));
- if (Rm == 0xD) {
+ if (Rm != 0xF) {
CHECK(S, DecodeGPRRegisterClass(Inst, Rn, Address, Decoder));
}
Modified: llvm/trunk/test/MC/Disassembler/ARM/neon.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/neon.txt?rev=138251&r1=138250&r2=138251&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/ARM/neon.txt (original)
+++ llvm/trunk/test/MC/Disassembler/ARM/neon.txt Mon Aug 22 13:22:06 2011
@@ -1845,3 +1845,7 @@
# CHECK: vst4.16 {d17[3], d19[3], d21[3], d23[3]}, [r0, :64]
0x4f 0x1b 0xc0 0xf4
# CHECK: vst4.32 {d17[0], d19[0], d21[0], d23[0]}, [r0]
+
+0x0 0xc 0xa0 0xf4
+# CHECK: vld1.8 {d0[]}, [r0], r0
+
From nicholas at mxc.ca Mon Aug 22 13:26:12 2011
From: nicholas at mxc.ca (Nick Lewycky)
Date: Mon, 22 Aug 2011 18:26:12 -0000
Subject: [llvm-commits] [llvm] r138252 -
/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
Message-ID: <20110822182612.D0C3B2A6C12C@llvm.org>
Author: nicholas
Date: Mon Aug 22 13:26:12 2011
New Revision: 138252
URL: http://llvm.org/viewvc/llvm-project?rev=138252&view=rev
Log:
Be less redundant.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp?rev=138252&r1=138251&r2=138252&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Mon Aug 22 13:26:12 2011
@@ -43,7 +43,6 @@
dbgs() << "ScalarizeVectorResult #" << ResNo << ": ";
N->dump(&DAG);
dbgs() << "\n";
- dbgs() << "Do not know how to scalarize the result of this operator!\n";
#endif
report_fatal_error("Do not know how to scalarize the result of this "
"operator!\n");
From resistor at mac.com Mon Aug 22 13:42:13 2011
From: resistor at mac.com (Owen Anderson)
Date: Mon, 22 Aug 2011 18:42:13 -0000
Subject: [llvm-commits] [llvm] r138255 - in /llvm/trunk:
lib/Target/ARM/Disassembler/ARMDisassembler.cpp
test/MC/Disassembler/ARM/neon.txt
Message-ID: <20110822184213.CE5992A6C12C@llvm.org>
Author: resistor
Date: Mon Aug 22 13:42:13 2011
New Revision: 138255
URL: http://llvm.org/viewvc/llvm-project?rev=138255&view=rev
Log:
Fix another batch of VLD/VST decoding crashes discovered by randomized testing.
Modified:
llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
llvm/trunk/test/MC/Disassembler/ARM/neon.txt
Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp?rev=138255&r1=138254&r2=138255&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp (original)
+++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp Mon Aug 22 13:42:13 2011
@@ -2769,8 +2769,11 @@
}
CHECK(S, DecodeGPRRegisterClass(Inst, Rn, Address, Decoder));
Inst.addOperand(MCOperand::CreateImm(align));
- if (Rm != 0xF && Rm != 0xD) {
- CHECK(S, DecodeGPRRegisterClass(Inst, Rm, Address, Decoder));
+ if (Rm != 0xF) {
+ if (Rm != 0xD)
+ CHECK(S, DecodeGPRRegisterClass(Inst, Rm, Address, Decoder));
+ else
+ Inst.addOperand(MCOperand::CreateReg(0));
}
CHECK(S, DecodeDPRRegisterClass(Inst, Rd, Address, Decoder));
@@ -2819,8 +2822,11 @@
}
CHECK(S, DecodeGPRRegisterClass(Inst, Rn, Address, Decoder));
Inst.addOperand(MCOperand::CreateImm(align));
- if (Rm != 0xF && Rm != 0xD) {
- CHECK(S, DecodeGPRRegisterClass(Inst, Rm, Address, Decoder));
+ if (Rm != 0xF) {
+ if (Rm != 0xD)
+ CHECK(S, DecodeGPRRegisterClass(Inst, Rm, Address, Decoder));
+ else
+ Inst.addOperand(MCOperand::CreateReg(0));
}
CHECK(S, DecodeDPRRegisterClass(Inst, Rd, Address, Decoder));
@@ -2876,8 +2882,11 @@
}
CHECK(S, DecodeGPRRegisterClass(Inst, Rn, Address, Decoder));
Inst.addOperand(MCOperand::CreateImm(align));
- if (Rm != 0xF && Rm != 0xD) {
- CHECK(S, DecodeGPRRegisterClass(Inst, Rm, Address, Decoder));
+ if (Rm != 0xF) {
+ if (Rm != 0xD)
+ CHECK(S, DecodeGPRRegisterClass(Inst, Rm, Address, Decoder));
+ else
+ Inst.addOperand(MCOperand::CreateReg(0));
}
CHECK(S, DecodeDPRRegisterClass(Inst, Rd, Address, Decoder));
@@ -2931,8 +2940,11 @@
}
CHECK(S, DecodeGPRRegisterClass(Inst, Rn, Address, Decoder));
Inst.addOperand(MCOperand::CreateImm(align));
- if (Rm != 0xF && Rm != 0xD) {
- CHECK(S, DecodeGPRRegisterClass(Inst, Rm, Address, Decoder));
+ if (Rm != 0xF) {
+ if (Rm != 0xD)
+ CHECK(S, DecodeGPRRegisterClass(Inst, Rm, Address, Decoder));
+ else
+ Inst.addOperand(MCOperand::CreateReg(0));
}
CHECK(S, DecodeDPRRegisterClass(Inst, Rd, Address, Decoder));
@@ -2989,8 +3001,11 @@
}
CHECK(S, DecodeGPRRegisterClass(Inst, Rn, Address, Decoder));
Inst.addOperand(MCOperand::CreateImm(align));
- if (Rm != 0xF && Rm != 0xD) {
- CHECK(S, DecodeGPRRegisterClass(Inst, Rm, Address, Decoder));
+ if (Rm != 0xF) {
+ if (Rm != 0xD)
+ CHECK(S, DecodeGPRRegisterClass(Inst, Rm, Address, Decoder));
+ else
+ Inst.addOperand(MCOperand::CreateReg(0));
}
CHECK(S, DecodeDPRRegisterClass(Inst, Rd, Address, Decoder));
@@ -3043,8 +3058,11 @@
}
CHECK(S, DecodeGPRRegisterClass(Inst, Rn, Address, Decoder));
Inst.addOperand(MCOperand::CreateImm(align));
- if (Rm != 0xF && Rm != 0xD) {
- CHECK(S, DecodeGPRRegisterClass(Inst, Rm, Address, Decoder));
+ if (Rm != 0xF) {
+ if (Rm != 0xD)
+ CHECK(S, DecodeGPRRegisterClass(Inst, Rm, Address, Decoder));
+ else
+ Inst.addOperand(MCOperand::CreateReg(0));
}
CHECK(S, DecodeDPRRegisterClass(Inst, Rd, Address, Decoder));
@@ -3103,8 +3121,11 @@
}
CHECK(S, DecodeGPRRegisterClass(Inst, Rn, Address, Decoder));
Inst.addOperand(MCOperand::CreateImm(align));
- if (Rm != 0xF && Rm != 0xD) {
- CHECK(S, DecodeGPRRegisterClass(Inst, Rm, Address, Decoder));
+ if (Rm != 0xF) {
+ if (Rm != 0xD)
+ CHECK(S, DecodeGPRRegisterClass(Inst, Rm, Address, Decoder));
+ else
+ Inst.addOperand(MCOperand::CreateReg(0));
}
CHECK(S, DecodeDPRRegisterClass(Inst, Rd, Address, Decoder));
@@ -3158,8 +3179,11 @@
}
CHECK(S, DecodeGPRRegisterClass(Inst, Rn, Address, Decoder));
Inst.addOperand(MCOperand::CreateImm(align));
- if (Rm != 0xF && Rm != 0xD) {
- CHECK(S, DecodeGPRRegisterClass(Inst, Rm, Address, Decoder));
+ if (Rm != 0xF) {
+ if (Rm != 0xD)
+ CHECK(S, DecodeGPRRegisterClass(Inst, Rm, Address, Decoder));
+ else
+ Inst.addOperand(MCOperand::CreateReg(0));
}
CHECK(S, DecodeDPRRegisterClass(Inst, Rd, Address, Decoder));
Modified: llvm/trunk/test/MC/Disassembler/ARM/neon.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/neon.txt?rev=138255&r1=138254&r2=138255&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/ARM/neon.txt (original)
+++ llvm/trunk/test/MC/Disassembler/ARM/neon.txt Mon Aug 22 13:42:13 2011
@@ -1848,4 +1848,6 @@
0x0 0xc 0xa0 0xf4
# CHECK: vld1.8 {d0[]}, [r0], r0
+0x0d 0x03 0x80 0xf4
+# CHECK: vst4.8 {d0[0], d1[0], d2[0], d3[0]}, [r0]!
From isanbard at gmail.com Mon Aug 22 13:44:49 2011
From: isanbard at gmail.com (Bill Wendling)
Date: Mon, 22 Aug 2011 18:44:49 -0000
Subject: [llvm-commits] [llvm] r138256 -
/llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp
Message-ID: <20110822184449.7BA3C2A6C12C@llvm.org>
Author: void
Date: Mon Aug 22 13:44:49 2011
New Revision: 138256
URL: http://llvm.org/viewvc/llvm-project?rev=138256&view=rev
Log:
Some whitespace fixes and #include reordering.
Modified:
llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp
Modified: llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp?rev=138256&r1=138255&r2=138256&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp (original)
+++ llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp Mon Aug 22 13:44:49 2011
@@ -21,13 +21,13 @@
#include "llvm/LLVMContext.h"
#include "llvm/Module.h"
#include "llvm/Pass.h"
-#include "llvm/ADT/SmallVector.h"
-#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/Passes.h"
-#include "llvm/Support/Debug.h"
#include "llvm/Target/TargetLowering.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/Local.h"
+#include "llvm/Support/Debug.h"
+#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/Statistic.h"
#include
using namespace llvm;
@@ -37,9 +37,7 @@
namespace {
class SjLjEHPass : public FunctionPass {
-
const TargetLowering *TLI;
-
Type *FunctionContextTy;
Constant *RegisterFn;
Constant *UnregisterFn;
@@ -53,7 +51,6 @@
Constant *ExceptionFn;
Constant *CallSiteFn;
Constant *DispatchSetupFn;
-
Value *CallSite;
public:
static char ID; // Pass identification, replacement for typeid
@@ -62,7 +59,7 @@
bool doInitialization(Module &M);
bool runOnFunction(Function &F);
- virtual void getAnalysisUsage(AnalysisUsage &AU) const { }
+ virtual void getAnalysisUsage(AnalysisUsage &AU) const {}
const char *getPassName() const {
return "SJLJ Exception Handling preparation";
}
@@ -190,7 +187,7 @@
SplitCriticalEdge(II, 1, this);
assert(!isa(II->getNormalDest()) &&
!isa(II->getUnwindDest()) &&
- "critical edge splitting left single entry phi nodes?");
+ "Critical edge splitting left single entry phi nodes?");
}
Function *F = Invokes.back()->getParent()->getParent();
From grosbach at apple.com Mon Aug 22 13:50:36 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 22 Aug 2011 18:50:36 -0000
Subject: [llvm-commits] [llvm] r138258 -
/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
Message-ID: <20110822185036.C63672A6C12C@llvm.org>
Author: grosbach
Date: Mon Aug 22 13:50:36 2011
New Revision: 138258
URL: http://llvm.org/viewvc/llvm-project?rev=138258&view=rev
Log:
Tighten up ARM reglist validation a bit.
Modified:
llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=138258&r1=138257&r2=138258&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Mon Aug 22 13:50:36 2011
@@ -24,6 +24,7 @@
#include "llvm/Target/TargetRegistry.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/raw_ostream.h"
+#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
@@ -1661,17 +1662,11 @@
Parser.Lex(); // Eat right curly brace token.
// Verify the register list.
- SmallVectorImpl >::const_iterator
- RI = Registers.begin(), RE = Registers.end();
-
- unsigned HighRegNum = getARMRegisterNumbering(RI->first);
bool EmittedWarning = false;
-
- DenseMap RegMap;
- RegMap[HighRegNum] = true;
-
- for (++RI; RI != RE; ++RI) {
- const std::pair &RegInfo = *RI;
+ unsigned HighRegNum = 0;
+ BitVector RegMap(32);
+ for (unsigned i = 0, e = Registers.size(); i != e; ++i) {
+ const std::pair &RegInfo = Registers[i];
unsigned Reg = getARMRegisterNumbering(RegInfo.first);
if (RegMap[Reg]) {
@@ -1683,7 +1678,7 @@
Warning(RegInfo.second,
"register not in ascending order in register list");
- RegMap[Reg] = true;
+ RegMap.set(Reg);
HighRegNum = std::max(Reg, HighRegNum);
}
From jediknil at belkadan.com Mon Aug 22 14:01:52 2011
From: jediknil at belkadan.com (Jordy Rose)
Date: Mon, 22 Aug 2011 19:01:52 -0000
Subject: [llvm-commits] [llvm] r138260 - in /llvm/trunk/lib/Support:
DynamicLibrary.cpp Windows/DynamicLibrary.inc
Message-ID: <20110822190152.D63592A6C12C@llvm.org>
Author: jrose
Date: Mon Aug 22 14:01:52 2011
New Revision: 138260
URL: http://llvm.org/viewvc/llvm-project?rev=138260&view=rev
Log:
Make DynamicLibrary thread-safe w/r/t call to dlerror() after dlopen(). PR10718
Modified:
llvm/trunk/lib/Support/DynamicLibrary.cpp
llvm/trunk/lib/Support/Windows/DynamicLibrary.inc
Modified: llvm/trunk/lib/Support/DynamicLibrary.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/DynamicLibrary.cpp?rev=138260&r1=138259&r2=138260&view=diff
==============================================================================
--- llvm/trunk/lib/Support/DynamicLibrary.cpp (original)
+++ llvm/trunk/lib/Support/DynamicLibrary.cpp Mon Aug 22 14:01:52 2011
@@ -72,6 +72,8 @@
DynamicLibrary DynamicLibrary::getPermanentLibrary(const char *filename,
std::string *errMsg) {
+ SmartScopedLock lock(getMutex());
+
void *handle = dlopen(filename, RTLD_LAZY|RTLD_GLOBAL);
if (handle == 0) {
if (errMsg) *errMsg = dlerror();
@@ -85,7 +87,6 @@
handle = RTLD_DEFAULT;
#endif
- SmartScopedLock lock(getMutex());
if (OpenedHandles == 0)
OpenedHandles = new DenseSet();
Modified: llvm/trunk/lib/Support/Windows/DynamicLibrary.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/DynamicLibrary.inc?rev=138260&r1=138259&r2=138260&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/DynamicLibrary.inc (original)
+++ llvm/trunk/lib/Support/Windows/DynamicLibrary.inc Mon Aug 22 14:01:52 2011
@@ -71,9 +71,10 @@
DynamicLibrary DynamicLibrary::getPermanentLibrary(const char *filename,
std::string *errMsg) {
+ SmartScopedLock lock(getMutex());
+
if (!filename) {
// When no file is specified, enumerate all DLLs and EXEs in the process.
- SmartScopedLock lock(getMutex());
if (OpenedHandles == 0)
OpenedHandles = new DenseSet();
@@ -90,7 +91,6 @@
return DynamicLibrary();
}
- SmartScopedLock lock(getMutex());
if (OpenedHandles == 0)
OpenedHandles = new DenseSet();
From resistor at mac.com Mon Aug 22 15:27:12 2011
From: resistor at mac.com (Owen Anderson)
Date: Mon, 22 Aug 2011 20:27:12 -0000
Subject: [llvm-commits] [llvm] r138269 - in /llvm/trunk:
lib/Target/ARM/ARMInstrVFP.td
lib/Target/ARM/Disassembler/ARMDisassembler.cpp
test/MC/Disassembler/ARM/neon.txt
Message-ID: <20110822202712.E61D72A6C12C@llvm.org>
Author: resistor
Date: Mon Aug 22 15:27:12 2011
New Revision: 138269
URL: http://llvm.org/viewvc/llvm-project?rev=138269&view=rev
Log:
Fix decoding of VMOVSRR and VMOVRRS, which account for the overwhelming majority of decoder crashes detected by randomized testing.
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrVFP.td
llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
llvm/trunk/test/MC/Disassembler/ARM/neon.txt
Modified: llvm/trunk/lib/Target/ARM/ARMInstrVFP.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrVFP.td?rev=138269&r1=138268&r2=138269&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrVFP.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrVFP.td Mon Aug 22 15:27:12 2011
@@ -521,6 +521,7 @@
// Some single precision VFP instructions may be executed on both NEON and VFP
// pipelines.
let D = VFPNeonDomain;
+ let DecoderMethod = "DecodeVMOVRRS";
}
} // neverHasSideEffects
@@ -559,6 +560,8 @@
// Some single precision VFP instructions may be executed on both NEON and VFP
// pipelines.
let D = VFPNeonDomain;
+
+ let DecoderMethod = "DecodeVMOVSRR";
}
// FMRDH: SPR -> GPR
Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp?rev=138269&r1=138268&r2=138269&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp (original)
+++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp Mon Aug 22 15:27:12 2011
@@ -175,6 +175,10 @@
uint64_t Address, const void *Decoder);
static DecodeStatus DecodeVST4LN(llvm::MCInst &Inst, unsigned Insn,
uint64_t Address, const void *Decoder);
+static DecodeStatus DecodeVMOVSRR(llvm::MCInst &Inst, unsigned Insn,
+ uint64_t Address, const void *Decoder);
+static DecodeStatus DecodeVMOVRRS(llvm::MCInst &Inst, unsigned Insn,
+ uint64_t Address, const void *Decoder);
static DecodeStatus DecodeThumbAddSpecialReg(llvm::MCInst &Inst, uint16_t Insn,
@@ -3195,3 +3199,44 @@
return S;
}
+static DecodeStatus DecodeVMOVSRR(llvm::MCInst &Inst, unsigned Insn,
+ uint64_t Address, const void *Decoder) {
+ DecodeStatus S = Success;
+ unsigned Rt = fieldFromInstruction32(Insn, 12, 4);
+ unsigned Rt2 = fieldFromInstruction32(Insn, 16, 4);
+ unsigned Rm = fieldFromInstruction32(Insn, 0, 4);
+ unsigned pred = fieldFromInstruction32(Insn, 28, 4);
+ Rm |= fieldFromInstruction32(Insn, 5, 1) << 4;
+
+ if (Rt == 0xF || Rt2 == 0xF || Rm == 0x1F)
+ CHECK(S, Unpredictable);
+
+ CHECK(S, DecodeSPRRegisterClass(Inst, Rm , Address, Decoder));
+ CHECK(S, DecodeSPRRegisterClass(Inst, Rm+1, Address, Decoder));
+ CHECK(S, DecodeGPRRegisterClass(Inst, Rt , Address, Decoder));
+ CHECK(S, DecodeGPRRegisterClass(Inst, Rt2 , Address, Decoder));
+ CHECK(S, DecodePredicateOperand(Inst, pred, Address, Decoder));
+
+ return S;
+}
+
+static DecodeStatus DecodeVMOVRRS(llvm::MCInst &Inst, unsigned Insn,
+ uint64_t Address, const void *Decoder) {
+ DecodeStatus S = Success;
+ unsigned Rt = fieldFromInstruction32(Insn, 12, 4);
+ unsigned Rt2 = fieldFromInstruction32(Insn, 16, 4);
+ unsigned Rm = fieldFromInstruction32(Insn, 0, 4);
+ unsigned pred = fieldFromInstruction32(Insn, 28, 4);
+ Rm |= fieldFromInstruction32(Insn, 5, 1) << 4;
+
+ if (Rt == 0xF || Rt2 == 0xF || Rm == 0x1F)
+ CHECK(S, Unpredictable);
+
+ CHECK(S, DecodeGPRRegisterClass(Inst, Rt , Address, Decoder));
+ CHECK(S, DecodeGPRRegisterClass(Inst, Rt2 , Address, Decoder));
+ CHECK(S, DecodeSPRRegisterClass(Inst, Rm , Address, Decoder));
+ CHECK(S, DecodeSPRRegisterClass(Inst, Rm+1, Address, Decoder));
+ CHECK(S, DecodePredicateOperand(Inst, pred, Address, Decoder));
+
+ return S;
+}
Modified: llvm/trunk/test/MC/Disassembler/ARM/neon.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/neon.txt?rev=138269&r1=138268&r2=138269&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/ARM/neon.txt (original)
+++ llvm/trunk/test/MC/Disassembler/ARM/neon.txt Mon Aug 22 15:27:12 2011
@@ -1851,3 +1851,5 @@
0x0d 0x03 0x80 0xf4
# CHECK: vst4.8 {d0[0], d1[0], d2[0], d3[0]}, [r0]!
+0x3d 0x2a 0x5e 0x6c
+# CHECK: vmovvs r2, lr, s29, s30
From bruno.cardoso at gmail.com Mon Aug 22 15:31:04 2011
From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes)
Date: Mon, 22 Aug 2011 20:31:04 -0000
Subject: [llvm-commits] [llvm] r138271 - in /llvm/trunk:
lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/avx-cmp.ll
Message-ID: <20110822203104.959B12A6C12D@llvm.org>
Author: bruno
Date: Mon Aug 22 15:31:04 2011
New Revision: 138271
URL: http://llvm.org/viewvc/llvm-project?rev=138271&view=rev
Log:
Add support for breaking 256-bit int VETCC into two 128-bit ones,
avoding scalarization of the compare. Reduces code from 59 to 6
instructions. Fix PR10712.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
llvm/trunk/test/CodeGen/X86/avx-cmp.ll
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=138271&r1=138270&r2=138271&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Aug 22 15:31:04 2011
@@ -8119,6 +8119,39 @@
DAG.getConstant(X86CC, MVT::i8), EFLAGS);
}
+// Lower256IntVETCC - Break a VSETCC 256-bit integer VSETCC into two new 128
+// ones, and then concatenate the result back.
+static SDValue Lower256IntVETCC(SDValue Op, SelectionDAG &DAG) {
+ EVT VT = Op.getValueType();
+
+ assert(VT.getSizeInBits() == 256 && Op.getOpcode() == ISD::VSETCC &&
+ "Unsupported value type for operation");
+
+ int NumElems = VT.getVectorNumElements();
+ DebugLoc dl = Op.getDebugLoc();
+ SDValue CC = Op.getOperand(2);
+ SDValue Idx0 = DAG.getConstant(0, MVT::i32);
+ SDValue Idx1 = DAG.getConstant(NumElems/2, MVT::i32);
+
+ // Extract the LHS vectors
+ SDValue LHS = Op.getOperand(0);
+ SDValue LHS1 = Extract128BitVector(LHS, Idx0, DAG, dl);
+ SDValue LHS2 = Extract128BitVector(LHS, Idx1, DAG, dl);
+
+ // Extract the RHS vectors
+ SDValue RHS = Op.getOperand(1);
+ SDValue RHS1 = Extract128BitVector(RHS, Idx0, DAG, dl);
+ SDValue RHS2 = Extract128BitVector(RHS, Idx1, DAG, dl);
+
+ // Issue the operation on the smaller types and concatenate the result back
+ MVT EltVT = VT.getVectorElementType().getSimpleVT();
+ EVT NewVT = MVT::getVectorVT(EltVT, NumElems/2);
+ return DAG.getNode(ISD::CONCAT_VECTORS, dl, VT,
+ DAG.getNode(Op.getOpcode(), dl, NewVT, LHS1, RHS1, CC),
+ DAG.getNode(Op.getOpcode(), dl, NewVT, LHS2, RHS2, CC));
+}
+
+
SDValue X86TargetLowering::LowerVSETCC(SDValue Op, SelectionDAG &DAG) const {
SDValue Cond;
SDValue Op0 = Op.getOperand(0);
@@ -8181,8 +8214,9 @@
return DAG.getNode(Opc, dl, VT, Op0, Op1, DAG.getConstant(SSECC, MVT::i8));
}
+ // Break 256-bit integer vector compare into smaller ones.
if (!isFP && VT.getSizeInBits() == 256)
- return SDValue();
+ return Lower256IntVETCC(Op, DAG);
// We are handling one of the integer comparisons here. Since SSE only has
// GT and EQ comparisons for integer, swapping operands and multiple
Modified: llvm/trunk/test/CodeGen/X86/avx-cmp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx-cmp.ll?rev=138271&r1=138270&r2=138271&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/avx-cmp.ll (original)
+++ llvm/trunk/test/CodeGen/X86/avx-cmp.ll Mon Aug 22 15:31:04 2011
@@ -42,3 +42,14 @@
ret void
}
+; CHECK: vextractf128 $1
+; CHECK: vextractf128 $1
+; CHECK-NEXT: vpcmpgtd %xmm
+; CHECK-NEXT: vpcmpgtd %xmm
+; CHECK-NEXT: vinsertf128 $1
+define <8 x i32> @int256-cmp(<8 x i32> %i, <8 x i32> %j) nounwind readnone {
+ %bincmp = icmp slt <8 x i32> %i, %j
+ %x = sext <8 x i1> %bincmp to <8 x i32>
+ ret <8 x i32> %x
+}
+
From bruno.cardoso at gmail.com Mon Aug 22 15:31:00 2011
From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes)
Date: Mon, 22 Aug 2011 20:31:00 -0000
Subject: [llvm-commits] [llvm] r138270 -
/llvm/trunk/lib/Target/X86/X86InstrSSE.td
Message-ID: <20110822203100.9D5552A6C12C@llvm.org>
Author: bruno
Date: Mon Aug 22 15:31:00 2011
New Revision: 138270
URL: http://llvm.org/viewvc/llvm-project?rev=138270&view=rev
Log:
Add 128-bit AVX codegen for PCMP* family of integer instructions
Modified:
llvm/trunk/lib/Target/X86/X86InstrSSE.td
Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=138270&r1=138269&r2=138270&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Mon Aug 22 15:31:00 2011
@@ -2691,6 +2691,32 @@
0>, VEX_4V;
defm VPCMPGTD : PDI_binop_rm_int<0x66, "vpcmpgtd", int_x86_sse2_pcmpgt_d, 0,
0>, VEX_4V;
+
+ def : Pat<(v16i8 (X86pcmpeqb VR128:$src1, VR128:$src2)),
+ (VPCMPEQBrr VR128:$src1, VR128:$src2)>;
+ def : Pat<(v16i8 (X86pcmpeqb VR128:$src1, (memop addr:$src2))),
+ (VPCMPEQBrm VR128:$src1, addr:$src2)>;
+ def : Pat<(v8i16 (X86pcmpeqw VR128:$src1, VR128:$src2)),
+ (VPCMPEQWrr VR128:$src1, VR128:$src2)>;
+ def : Pat<(v8i16 (X86pcmpeqw VR128:$src1, (memop addr:$src2))),
+ (VPCMPEQWrm VR128:$src1, addr:$src2)>;
+ def : Pat<(v4i32 (X86pcmpeqd VR128:$src1, VR128:$src2)),
+ (VPCMPEQDrr VR128:$src1, VR128:$src2)>;
+ def : Pat<(v4i32 (X86pcmpeqd VR128:$src1, (memop addr:$src2))),
+ (VPCMPEQDrm VR128:$src1, addr:$src2)>;
+
+ def : Pat<(v16i8 (X86pcmpgtb VR128:$src1, VR128:$src2)),
+ (VPCMPGTBrr VR128:$src1, VR128:$src2)>;
+ def : Pat<(v16i8 (X86pcmpgtb VR128:$src1, (memop addr:$src2))),
+ (VPCMPGTBrm VR128:$src1, addr:$src2)>;
+ def : Pat<(v8i16 (X86pcmpgtw VR128:$src1, VR128:$src2)),
+ (VPCMPGTWrr VR128:$src1, VR128:$src2)>;
+ def : Pat<(v8i16 (X86pcmpgtw VR128:$src1, (memop addr:$src2))),
+ (VPCMPGTWrm VR128:$src1, addr:$src2)>;
+ def : Pat<(v4i32 (X86pcmpgtd VR128:$src1, VR128:$src2)),
+ (VPCMPGTDrr VR128:$src1, VR128:$src2)>;
+ def : Pat<(v4i32 (X86pcmpgtd VR128:$src1, (memop addr:$src2))),
+ (VPCMPGTDrm VR128:$src1, addr:$src2)>;
}
let Constraints = "$src1 = $dst" in {
From resistor at mac.com Mon Aug 22 16:34:00 2011
From: resistor at mac.com (Owen Anderson)
Date: Mon, 22 Aug 2011 21:34:00 -0000
Subject: [llvm-commits] [llvm] r138273 - in /llvm/trunk:
lib/Target/ARM/ARMInstrVFP.td test/MC/Disassembler/ARM/neon.txt
Message-ID: <20110822213401.078F42A6C12C@llvm.org>
Author: resistor
Date: Mon Aug 22 16:34:00 2011
New Revision: 138273
URL: http://llvm.org/viewvc/llvm-project?rev=138273&view=rev
Log:
Provide operand encoding information for half-precision VCVT instructions. Found by randomized testing.
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrVFP.td
llvm/trunk/test/MC/Disassembler/ARM/neon.txt
Modified: llvm/trunk/lib/Target/ARM/ARMInstrVFP.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrVFP.td?rev=138273&r1=138272&r2=138273&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrVFP.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrVFP.td Mon Aug 22 16:34:00 2011
@@ -387,26 +387,26 @@
// Between half-precision and single-precision. For disassembly only.
// FIXME: Verify encoding after integrated assembler is working.
-def VCVTBSH: ASuI<0b11101, 0b11, 0b0010, 0b01, 0, (outs SPR:$dst), (ins SPR:$a),
- /* FIXME */ IIC_fpCVTSH, "vcvtb", ".f32.f16\t$dst, $a",
+def VCVTBSH: ASuI<0b11101, 0b11, 0b0010, 0b01, 0, (outs SPR:$Sd), (ins SPR:$Sm),
+ /* FIXME */ IIC_fpCVTSH, "vcvtb", ".f32.f16\t$Sd, $Sm",
[/* For disassembly only; pattern left blank */]>;
def : ARMPat<(f32_to_f16 SPR:$a),
(i32 (COPY_TO_REGCLASS (VCVTBSH SPR:$a), GPR))>;
-def VCVTBHS: ASuI<0b11101, 0b11, 0b0011, 0b01, 0, (outs SPR:$dst), (ins SPR:$a),
- /* FIXME */ IIC_fpCVTHS, "vcvtb", ".f16.f32\t$dst, $a",
+def VCVTBHS: ASuI<0b11101, 0b11, 0b0011, 0b01, 0, (outs SPR:$Sd), (ins SPR:$Sm),
+ /* FIXME */ IIC_fpCVTHS, "vcvtb", ".f16.f32\t$Sd, $Sm",
[/* For disassembly only; pattern left blank */]>;
def : ARMPat<(f16_to_f32 GPR:$a),
(VCVTBHS (COPY_TO_REGCLASS GPR:$a, SPR))>;
-def VCVTTSH: ASuI<0b11101, 0b11, 0b0010, 0b11, 0, (outs SPR:$dst), (ins SPR:$a),
- /* FIXME */ IIC_fpCVTSH, "vcvtt", ".f32.f16\t$dst, $a",
+def VCVTTSH: ASuI<0b11101, 0b11, 0b0010, 0b11, 0, (outs SPR:$Sd), (ins SPR:$Sm),
+ /* FIXME */ IIC_fpCVTSH, "vcvtt", ".f32.f16\t$Sd, $Sm",
[/* For disassembly only; pattern left blank */]>;
-def VCVTTHS: ASuI<0b11101, 0b11, 0b0011, 0b11, 0, (outs SPR:$dst), (ins SPR:$a),
- /* FIXME */ IIC_fpCVTHS, "vcvtt", ".f16.f32\t$dst, $a",
+def VCVTTHS: ASuI<0b11101, 0b11, 0b0011, 0b11, 0, (outs SPR:$Sd), (ins SPR:$Sm),
+ /* FIXME */ IIC_fpCVTHS, "vcvtt", ".f16.f32\t$Sd, $Sm",
[/* For disassembly only; pattern left blank */]>;
def VNEGD : ADuI<0b11101, 0b11, 0b0001, 0b01, 0,
Modified: llvm/trunk/test/MC/Disassembler/ARM/neon.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/neon.txt?rev=138273&r1=138272&r2=138273&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/ARM/neon.txt (original)
+++ llvm/trunk/test/MC/Disassembler/ARM/neon.txt Mon Aug 22 16:34:00 2011
@@ -1853,3 +1853,6 @@
0x3d 0x2a 0x5e 0x6c
# CHECK: vmovvs r2, lr, s29, s30
+
+0xe9 0x1a 0xb2 0x4e
+# CHECK: vcvttmi.f32.f16 s2, s19
From eli.friedman at gmail.com Mon Aug 22 16:35:28 2011
From: eli.friedman at gmail.com (Eli Friedman)
Date: Mon, 22 Aug 2011 21:35:28 -0000
Subject: [llvm-commits] [llvm] r138274 - in /llvm/trunk/docs: Atomics.html
LangRef.html
Message-ID: <20110822213528.29A982A6C12C@llvm.org>
Author: efriedma
Date: Mon Aug 22 16:35:27 2011
New Revision: 138274
URL: http://llvm.org/viewvc/llvm-project?rev=138274&view=rev
Log:
Some minor wording updates and cross-linking for atomic docs. Explicitly note that we don't try to portably define what volatile in LLVM IR means.
Modified:
llvm/trunk/docs/Atomics.html
llvm/trunk/docs/LangRef.html
Modified: llvm/trunk/docs/Atomics.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/Atomics.html?rev=138274&r1=138273&r2=138274&view=diff
==============================================================================
--- llvm/trunk/docs/Atomics.html (original)
+++ llvm/trunk/docs/Atomics.html Mon Aug 22 16:35:27 2011
@@ -121,9 +121,10 @@
However, LLVM is not allowed to transform the former to the latter: it could
- introduce undefined behavior if another thread can access x at the same time.
- (This example is particularly of interest because before the concurrency model
- was implemented, LLVM would perform this transformation.)
+ indirectly introduce undefined behavior if another thread can access x at
+ the same time. (This example is particularly of interest because before the
+ concurrency model was implemented, LLVM would perform this
+ transformation.)
Note that speculative loads are allowed; a load which
is part of a race returns undef, but does not have undefined
@@ -177,7 +178,7 @@
In order to achieve a balance between performance and necessary guarantees,
there are six levels of atomicity. They are listed in order of strength;
each level includes all the guarantees of the previous level except for
- Acquire/Release.
NotAtomic is the obvious, a load or store which is not atomic. (This isn't
really a level of atomicity, but is listed here for comparison.) This is
- essentially a regular load or store. If code accesses a memory location
- from multiple threads at the same time, the resulting loads return
- 'undef'.
+ essentially a regular load or store. If there is a race on a given memory
+ location, loads from that location return undef.
Relevant standard
This is intended to match shared variables in C/C++, and to be used
in any other context where memory access is necessary, and
- a race is impossible.
+ a race is impossible. (The precise definition is in
+ LangRef.)
Notes for frontends
The rule is essentially that all memory accessed with basic loads and
stores by multiple threads should be protected by a lock or other
Modified: llvm/trunk/docs/LangRef.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=138274&r1=138273&r2=138274&view=diff
==============================================================================
--- llvm/trunk/docs/LangRef.html (original)
+++ llvm/trunk/docs/LangRef.html Mon Aug 22 16:35:27 2011
@@ -1497,6 +1497,9 @@
ways to create them, and we define LLVM IR's behavior in their presence. This
model is inspired by the C++0x memory model.
+
We define a happens-before partial order as the least partial order
that
@@ -1533,7 +1536,12 @@
Given that definition, Rbyte is defined as follows:
-
If there is no write to the same byte that happens before
+
If R is volatile, the result is target-dependent. (Volatile
+ is supposed to give guarantees which can support
+ sig_atomic_t in C/C++, and may be used for accesses to
+ addresses which do not behave like normal memory. It does not generally
+ provide cross-thread synchronization.)
+
Otherwise, if there is no write to the same byte that happens before
Rbyte, Rbyte returns
undef for that byte.
Otherwise, if Rbyte may see exactly one write,
@@ -1590,10 +1598,15 @@
that determines which other atomic instructions on the same address they
synchronize with. These semantics are borrowed from Java and C++0x,
but are somewhat more colloquial. If these descriptions aren't precise enough,
-check those specs. fence instructions
+check those specs (see spec references in the
+atomics guide).
+fence instructions
treat these orderings somewhat differently since they don't take an address.
See that instruction's documentation for details.
+
The set of values that can be read is governed by the happens-before
@@ -1618,18 +1631,20 @@
monotonic (or stronger) operations on the same address. If an
address is written monotonically by one thread, and other threads
monotonically read that address repeatedly, the other threads must
-eventually see the write. This is intended to model C++'s relaxed atomic
-variables.
+eventually see the write. This corresponds to the C++0x/C1x
+memory_order_relaxed.
acquire
In addition to the guarantees of monotonic, if this operation
reads a value written by a release atomic operation, it
-synchronizes-with that operation.
+synchronizes-with that operation. This corresponds to the C++0x/C1x
+memory_order_acquire.
release
In addition to the guarantees of monotonic,
-a synchronizes-with edge may be formed by an acquire
-operation.
+a synchronizes-with edge may be formed with an acquire
+operation. This is intended to model C++'s memory_order_release.
acq_rel (acquire+release)
Acts as both an
-acquire and release operation on its address.
+acquire and release operation on its address.
+This corresponds to the C++0x/C1x memory_order_acq_rel.
seq_cst (sequentially consistent)
In addition to the guarantees of acq_rel
(acquire for an operation which only reads, release
@@ -1637,9 +1652,8 @@
sequentially-consistent operations on all addresses, which is consistent with
the happens-before partial order and with the modification orders of
all the affected addresses. Each sequentially-consistent read sees the last
-preceding write to the same address in this global order. This is intended
-to model C++'s sequentially-consistent atomic variables and Java's volatile
-shared variables.
+preceding write to the same address in this global order. This corresponds
+to the C++0x/C1x memory_order_seq_cst and Java volatile.
If an atomic operation is marked singlethread,
From bob.wilson at apple.com Mon Aug 22 16:39:01 2011
From: bob.wilson at apple.com (Bob Wilson)
Date: Mon, 22 Aug 2011 21:39:01 -0000
Subject: [llvm-commits] [compiler-rt] r138275 -
/compiler-rt/trunk/make/platform/clang_darwin.mk
Message-ID: <20110822213901.659E22A6C12C@llvm.org>
Author: bwilson
Date: Mon Aug 22 16:39:01 2011
New Revision: 138275
URL: http://llvm.org/viewvc/llvm-project?rev=138275&view=rev
Log:
Remove redundant flag: -mthumb is the default for armv7.
Modified:
compiler-rt/trunk/make/platform/clang_darwin.mk
Modified: compiler-rt/trunk/make/platform/clang_darwin.mk
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/make/platform/clang_darwin.mk?rev=138275&r1=138274&r2=138275&view=diff
==============================================================================
--- compiler-rt/trunk/make/platform/clang_darwin.mk (original)
+++ compiler-rt/trunk/make/platform/clang_darwin.mk Mon Aug 22 16:39:01 2011
@@ -86,7 +86,7 @@
CFLAGS.cc_kext.i386 := $(CFLAGS) $(X86_DEPLOYMENT_ARGS)
CFLAGS.cc_kext.x86_64 := $(CFLAGS) $(X86_DEPLOYMENT_ARGS)
CFLAGS.cc_kext.armv6 := $(CFLAGS) $(ARM_DEPLOYMENT_ARGS) -mthumb
-CFLAGS.cc_kext.armv7 := $(CFLAGS) $(ARM_DEPLOYMENT_ARGS) -mthumb
+CFLAGS.cc_kext.armv7 := $(CFLAGS) $(ARM_DEPLOYMENT_ARGS)
FUNCTIONS.eprintf := eprintf
FUNCTIONS.10.4 := eprintf floatundidf floatundisf floatundixf
From bob.wilson at apple.com Mon Aug 22 16:49:47 2011
From: bob.wilson at apple.com (Bob Wilson)
Date: Mon, 22 Aug 2011 21:49:47 -0000
Subject: [llvm-commits] [compiler-rt] r138277 -
/compiler-rt/trunk/lib/assembly.h
Message-ID: <20110822214947.F021C2A6C12C@llvm.org>
Author: bwilson
Date: Mon Aug 22 16:49:47 2011
New Revision: 138277
URL: http://llvm.org/viewvc/llvm-project?rev=138277&view=rev
Log:
Refactor DEFINE_COMPILERRT_FUNCTION.
Modified:
compiler-rt/trunk/lib/assembly.h
Modified: compiler-rt/trunk/lib/assembly.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/assembly.h?rev=138277&r1=138276&r2=138277&view=diff
==============================================================================
--- compiler-rt/trunk/lib/assembly.h (original)
+++ compiler-rt/trunk/lib/assembly.h Mon Aug 22 16:49:47 2011
@@ -35,15 +35,16 @@
#define SYMBOL_NAME(name) GLUE(__USER_LABEL_PREFIX__, name)
#ifdef VISIBILITY_HIDDEN
-#define DEFINE_COMPILERRT_FUNCTION(name) \
- .globl SYMBOL_NAME(name) SEPARATOR \
- HIDDEN_DIRECTIVE SYMBOL_NAME(name) SEPARATOR \
- SYMBOL_NAME(name):
+#define DECLARE_SYMBOL_VISIBILITY(name) \
+ HIDDEN_DIRECTIVE SYMBOL_NAME(name) SEPARATOR
#else
+#define DECLARE_SYMBOL_VISIBILITY(name)
+#endif
+
#define DEFINE_COMPILERRT_FUNCTION(name) \
.globl SYMBOL_NAME(name) SEPARATOR \
+ DECLARE_SYMBOL_VISIBILITY(name) \
SYMBOL_NAME(name):
-#endif
#define DEFINE_COMPILERRT_PRIVATE_FUNCTION(name) \
.globl SYMBOL_NAME(name) SEPARATOR \
From grosbach at apple.com Mon Aug 22 17:00:18 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 22 Aug 2011 22:00:18 -0000
Subject: [llvm-commits] [llvm] r138278 -
/llvm/trunk/lib/Target/ARM/ARMInstrThumb.td
Message-ID: <20110822220018.A3E702A6C12C@llvm.org>
Author: grosbach
Date: Mon Aug 22 17:00:18 2011
New Revision: 138278
URL: http://llvm.org/viewvc/llvm-project?rev=138278&view=rev
Log:
Temporarilly mark tMUL as not commutable.
It's not playing nicely in the coalescer with the tied operand. Disable
commutability for now while we figure out the deeper fix.
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrThumb.td
Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb.td?rev=138278&r1=138277&r2=138278&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrThumb.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Mon Aug 22 17:00:18 2011
@@ -1047,7 +1047,7 @@
} // neverHasSideEffects
// Multiply register
-let isCommutable = 1 in
+//let isCommutable = 1 in
def tMUL : // A8.6.105 T1
Thumb1sI<(outs tGPR:$Rd), (ins tGPR:$Rn, tGPR:$Rm), AddrModeNone, 2,
IIC_iMUL32, "mul", "\t$Rd, $Rn, $Rm", "$Rm = $Rd",
From krasin at chromium.org Mon Aug 22 17:55:44 2011
From: krasin at chromium.org (Ivan Krasin)
Date: Mon, 22 Aug 2011 15:55:44 -0700
Subject: [llvm-commits] [PATCH]Add nacl support to Triple::ParseOS
Message-ID:
Hi llvm team,
the attached patch is the follow up to r138005. I have forgot to add a
case for nacl into Triple::ParseOS.
Please, let me know if it's fine to commit.
Thanks in advance,
Ivan Krasin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parse-nacl-os.patch
Type: text/x-patch
Size: 381 bytes
Desc: not available
Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110822/c1d2c656/attachment.bin
From benny.kra at googlemail.com Mon Aug 22 17:55:32 2011
From: benny.kra at googlemail.com (Benjamin Kramer)
Date: Mon, 22 Aug 2011 22:55:32 -0000
Subject: [llvm-commits] [llvm] r138285 -
/llvm/trunk/lib/Target/X86/X86InstrInfo.td
Message-ID: <20110822225532.E22A62A6C12C@llvm.org>
Author: d0k
Date: Mon Aug 22 17:55:32 2011
New Revision: 138285
URL: http://llvm.org/viewvc/llvm-project?rev=138285&view=rev
Log:
X86: Add some operand types required to identify calls.
Modified:
llvm/trunk/lib/Target/X86/X86InstrInfo.td
Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=138285&r1=138284&r2=138285&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Mon Aug 22 17:55:32 2011
@@ -405,11 +405,13 @@
def i64i32imm_pcrel : Operand {
let PrintMethod = "print_pcrel_imm";
let ParserMatchClass = X86AbsMemAsmOperand;
+ let OperandType = "OPERAND_PCREL";
}
// 64-bits but only 8 bits are significant.
def i64i8imm : Operand {
let ParserMatchClass = ImmSExti64i8AsmOperand;
+ let OperandType = "OPERAND_IMMEDIATE";
}
def lea64_32mem : Operand {
From grosbach at apple.com Mon Aug 22 18:00:19 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 22 Aug 2011 23:00:19 -0000
Subject: [llvm-commits] [llvm] r138286 -
/llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
Message-ID: <20110822230019.56BC82A6C12C@llvm.org>
Author: grosbach
Date: Mon Aug 22 18:00:19 2011
New Revision: 138286
URL: http://llvm.org/viewvc/llvm-project?rev=138286&view=rev
Log:
Thumb assembly parsing and encoding for POP.
Modified:
llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
Modified: llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/basic-thumb-instructions.s?rev=138286&r1=138285&r2=138286&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/basic-thumb-instructions.s (original)
+++ llvm/trunk/test/MC/ARM/basic-thumb-instructions.s Mon Aug 22 18:00:19 2011
@@ -363,3 +363,11 @@
orrs r3, r4
@ CHECK-ERRORS: orrs r3, r4 @ encoding: [0x23,0x43]
+
+
+ at ------------------------------------------------------------------------------
+@ POP
+ at ------------------------------------------------------------------------------
+ pop {r2, r3, r6}
+
+@ CHECK: pop {r2, r3, r6} @ encoding: [0x4c,0xbc]
From grosbach at apple.com Mon Aug 22 18:01:07 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 22 Aug 2011 23:01:07 -0000
Subject: [llvm-commits] [llvm] r138287 - in /llvm/trunk:
lib/Target/ARM/AsmParser/ARMAsmParser.cpp test/MC/ARM/thumb-diagnostics.s
Message-ID: <20110822230107.C61E52A6C12C@llvm.org>
Author: grosbach
Date: Mon Aug 22 18:01:07 2011
New Revision: 138287
URL: http://llvm.org/viewvc/llvm-project?rev=138287&view=rev
Log:
Thumb assemmbly parsing diagnostic improvements for LDM.
Modified:
llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
llvm/trunk/test/MC/ARM/thumb-diagnostics.s
Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=138287&r1=138286&r2=138287&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Mon Aug 22 18:01:07 2011
@@ -3084,6 +3084,9 @@
// Thumb LDM instructions are writeback iff the base register is not
// in the register list.
unsigned Rn = Inst.getOperand(0).getReg();
+ bool hasWritebackToken =
+ (static_cast(Operands[3])->isToken() &&
+ static_cast(Operands[3])->getToken() == "!");
bool doesWriteback = true;
for (unsigned i = 3; i < Inst.getNumOperands(); ++i) {
unsigned Reg = Inst.getOperand(i).getReg();
@@ -3091,15 +3094,18 @@
doesWriteback = false;
// Anything other than a low register isn't legal here.
if (!isARMLowRegister(Reg))
- return Error(Operands[4]->getStartLoc(),
+ return Error(Operands[3 + hasWritebackToken]->getStartLoc(),
"registers must be in range r0-r7");
}
// If we should have writeback, then there should be a '!' token.
- if (doesWriteback &&
- (!static_cast(Operands[3])->isToken() ||
- static_cast(Operands[3])->getToken() != "!"))
+ if (doesWriteback && !hasWritebackToken)
return Error(Operands[2]->getStartLoc(),
"writeback operator '!' expected");
+ // Likewise, if we should not have writeback, there must not be a '!'
+ if (!doesWriteback && hasWritebackToken)
+ return Error(Operands[3]->getStartLoc(),
+ "writeback operator '!' not allowed when base register "
+ "in register list");
break;
}
Modified: llvm/trunk/test/MC/ARM/thumb-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/thumb-diagnostics.s?rev=138287&r1=138286&r2=138287&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/thumb-diagnostics.s (original)
+++ llvm/trunk/test/MC/ARM/thumb-diagnostics.s Mon Aug 22 18:01:07 2011
@@ -45,12 +45,16 @@
@ Invalid writeback and register lists for LDM
ldm r2!, {r5, r8}
ldm r2, {r5, r7}
+ ldm r2!, {r2, r3, r4}
@ CHECK-ERRORS: error: registers must be in range r0-r7
@ CHECK-ERRORS: ldm r2!, {r5, r8}
@ CHECK-ERRORS: ^
@ CHECK-ERRORS: error: writeback operator '!' expected
@ CHECK-ERRORS: ldm r2, {r5, r7}
@ CHECK-ERRORS: ^
+@ CHECK-ERRORS: error: writeback operator '!' not allowed when base register in register list
+@ CHECK-ERRORS: ldm r2!, {r2, r3}
+@ CHECK-ERRORS: ^
@ Out of range immediates for LSL instruction.
From echristo at apple.com Mon Aug 22 18:05:06 2011
From: echristo at apple.com (Eric Christopher)
Date: Mon, 22 Aug 2011 16:05:06 -0700
Subject: [llvm-commits] [PATCH]Add nacl support to Triple::ParseOS
In-Reply-To:
References:
Message-ID: <2531D794-3D31-4E06-BB81-C59F065E6563@apple.com>
On Aug 22, 2011, at 3:55 PM, Ivan Krasin wrote:
>
OK.
-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110822/3ef68c03/attachment.html
From grosbach at apple.com Mon Aug 22 18:04:27 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 22 Aug 2011 23:04:27 -0000
Subject: [llvm-commits] [llvm] r138288 -
/llvm/trunk/test/MC/ARM/thumb-diagnostics.s
Message-ID: <20110822230427.290682A6C12C@llvm.org>
Author: grosbach
Date: Mon Aug 22 18:04:26 2011
New Revision: 138288
URL: http://llvm.org/viewvc/llvm-project?rev=138288&view=rev
Log:
Fix think-o.
Modified:
llvm/trunk/test/MC/ARM/thumb-diagnostics.s
Modified: llvm/trunk/test/MC/ARM/thumb-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/thumb-diagnostics.s?rev=138288&r1=138287&r2=138288&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/thumb-diagnostics.s (original)
+++ llvm/trunk/test/MC/ARM/thumb-diagnostics.s Mon Aug 22 18:04:26 2011
@@ -53,7 +53,7 @@
@ CHECK-ERRORS: ldm r2, {r5, r7}
@ CHECK-ERRORS: ^
@ CHECK-ERRORS: error: writeback operator '!' not allowed when base register in register list
-@ CHECK-ERRORS: ldm r2!, {r2, r3}
+@ CHECK-ERRORS: ldm r2!, {r2, r3, r4}
@ CHECK-ERRORS: ^
From evan.cheng at apple.com Mon Aug 22 18:04:56 2011
From: evan.cheng at apple.com (Evan Cheng)
Date: Mon, 22 Aug 2011 23:04:56 -0000
Subject: [llvm-commits] [llvm] r138289 -
/llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp
Message-ID: <20110822230456.598B52A6C12C@llvm.org>
Author: evancheng
Date: Mon Aug 22 18:04:56 2011
New Revision: 138289
URL: http://llvm.org/viewvc/llvm-project?rev=138289&view=rev
Log:
Follow up to Jim's r138278. This fixes commuteInstruction so it handles two-address instructions correctly. I'll let Jim add a test case. :-)
Modified:
llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp
Modified: llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp?rev=138289&r1=138288&r2=138289&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp (original)
+++ llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp Mon Aug 22 18:04:56 2011
@@ -74,23 +74,25 @@
assert(MI->getOperand(Idx1).isReg() && MI->getOperand(Idx2).isReg() &&
"This only knows how to commute register operands so far");
+ unsigned Reg0 = HasDef ? MI->getOperand(0).getReg() : 0;
unsigned Reg1 = MI->getOperand(Idx1).getReg();
unsigned Reg2 = MI->getOperand(Idx2).getReg();
bool Reg1IsKill = MI->getOperand(Idx1).isKill();
bool Reg2IsKill = MI->getOperand(Idx2).isKill();
- bool ChangeReg0 = false;
- if (HasDef && MI->getOperand(0).getReg() == Reg1) {
- // Must be two address instruction!
- assert(MI->getDesc().getOperandConstraint(0, MCOI::TIED_TO) &&
- "Expecting a two-address instruction!");
+ // If destination is tied to either of the commuted source register, then
+ // it must be updated.
+ if (HasDef && Reg0 == Reg1 &&
+ MI->getDesc().getOperandConstraint(Idx1, MCOI::TIED_TO) == 0) {
Reg2IsKill = false;
- ChangeReg0 = true;
+ Reg0 = Reg2;
+ } else if (HasDef && Reg0 == Reg2 &&
+ MI->getDesc().getOperandConstraint(Idx2, MCOI::TIED_TO) == 0) {
+ Reg1IsKill = false;
+ Reg0 = Reg1;
}
if (NewMI) {
// Create a new instruction.
- unsigned Reg0 = HasDef
- ? (ChangeReg0 ? Reg2 : MI->getOperand(0).getReg()) : 0;
bool Reg0IsDead = HasDef ? MI->getOperand(0).isDead() : false;
MachineFunction &MF = *MI->getParent()->getParent();
if (HasDef)
@@ -104,8 +106,8 @@
.addReg(Reg1, getKillRegState(Reg2IsKill));
}
- if (ChangeReg0)
- MI->getOperand(0).setReg(Reg2);
+ if (HasDef)
+ MI->getOperand(0).setReg(Reg0);
MI->getOperand(Idx2).setReg(Reg1);
MI->getOperand(Idx1).setReg(Reg2);
MI->getOperand(Idx2).setIsKill(Reg1IsKill);
From grosbach at apple.com Mon Aug 22 18:05:11 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 22 Aug 2011 23:05:11 -0000
Subject: [llvm-commits] [llvm] r138290 -
/llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
Message-ID: <20110822230511.6C2412A6C12C@llvm.org>
Author: grosbach
Date: Mon Aug 22 18:05:11 2011
New Revision: 138290
URL: http://llvm.org/viewvc/llvm-project?rev=138290&view=rev
Log:
Thumb parsing and encoding for PUSH.
Modified:
llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
Modified: llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/basic-thumb-instructions.s?rev=138290&r1=138289&r2=138290&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/basic-thumb-instructions.s (original)
+++ llvm/trunk/test/MC/ARM/basic-thumb-instructions.s Mon Aug 22 18:05:11 2011
@@ -371,3 +371,11 @@
pop {r2, r3, r6}
@ CHECK: pop {r2, r3, r6} @ encoding: [0x4c,0xbc]
+
+
+ at ------------------------------------------------------------------------------
+@ PUSH
+ at ------------------------------------------------------------------------------
+ push {r1, r2, r7}
+
+@ CHECK: push {r1, r2, r7} @ encoding: [0x86,0xb4]
From krasin at chromium.org Mon Aug 22 18:08:53 2011
From: krasin at chromium.org (Ivan Krasin)
Date: Mon, 22 Aug 2011 23:08:53 -0000
Subject: [llvm-commits] [llvm] r138291 - /llvm/trunk/lib/Support/Triple.cpp
Message-ID: <20110822230853.6FD0D2A6C12C@llvm.org>
Author: krasin
Date: Mon Aug 22 18:08:53 2011
New Revision: 138291
URL: http://llvm.org/viewvc/llvm-project?rev=138291&view=rev
Log:
Add NativeClient support to Triple::ParseOS.
Modified:
llvm/trunk/lib/Support/Triple.cpp
Modified: llvm/trunk/lib/Support/Triple.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Triple.cpp?rev=138291&r1=138290&r2=138291&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Triple.cpp (original)
+++ llvm/trunk/lib/Support/Triple.cpp Mon Aug 22 18:08:53 2011
@@ -356,6 +356,8 @@
return Minix;
else if (OSName.startswith("rtems"))
return RTEMS;
+ else if (OSName.startswith("nacl"))
+ return NativeClient;
else
return UnknownOS;
}
From krasin at google.com Mon Aug 22 18:10:18 2011
From: krasin at google.com (Ivan Krasin)
Date: Mon, 22 Aug 2011 16:10:18 -0700
Subject: [llvm-commits] [PATCH]Add nacl support to Triple::ParseOS
In-Reply-To: <2531D794-3D31-4E06-BB81-C59F065E6563@apple.com>
References:
<2531D794-3D31-4E06-BB81-C59F065E6563@apple.com>
Message-ID:
Thanks, Eric. Committed as r138291.
On Mon, Aug 22, 2011 at 4:05 PM, Eric Christopher wrote:
>
> On Aug 22, 2011, at 3:55 PM, Ivan Krasin wrote:
>
>
>
> OK.
> -eric
From resistor at mac.com Mon Aug 22 18:10:16 2011
From: resistor at mac.com (Owen Anderson)
Date: Mon, 22 Aug 2011 23:10:16 -0000
Subject: [llvm-commits] [llvm] r138292 - in /llvm/trunk:
lib/Target/ARM/ARMInstrThumb2.td test/MC/Disassembler/ARM/thumb-tests.txt
Message-ID: <20110822231017.0A62C2A6C12C@llvm.org>
Author: resistor
Date: Mon Aug 22 18:10:16 2011
New Revision: 138292
URL: http://llvm.org/viewvc/llvm-project?rev=138292&view=rev
Log:
Provide a correct decoder hook for Thumb2 shifted registers. Found by randomized testing.
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt
Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=138292&r1=138291&r2=138292&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Mon Aug 22 18:10:16 2011
@@ -29,6 +29,7 @@
let EncoderMethod = "getT2SORegOpValue";
let PrintMethod = "printT2SOOperand";
let MIOperandInfo = (ops rGPR, i32imm);
+ let DecoderMethod = "DecodeSORegImmOperand";
}
// t2_so_imm_not_XFORM - Return the complement of a t2_so_imm value
Modified: llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt?rev=138292&r1=138291&r2=138292&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt (original)
+++ llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt Mon Aug 22 18:10:16 2011
@@ -274,3 +274,6 @@
# CHECK: ldrsh r1, [r0, r0]
0x01 0x5E
+
+# CHECK: and.w r5, r1, r10, ror #7
+0x1 0xea 0xfa 0x95
From grosbach at apple.com Mon Aug 22 18:13:54 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 22 Aug 2011 23:13:54 -0000
Subject: [llvm-commits] [llvm] r138293 - /llvm/trunk/test/MC/ARM/reg-list.s
Message-ID: <20110822231354.5F50B2A6C12C@llvm.org>
Author: grosbach
Date: Mon Aug 22 18:13:54 2011
New Revision: 138293
URL: http://llvm.org/viewvc/llvm-project?rev=138293&view=rev
Log:
Tidy up. Trailing whitespace.
Modified:
llvm/trunk/test/MC/ARM/reg-list.s
Modified: llvm/trunk/test/MC/ARM/reg-list.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/reg-list.s?rev=138293&r1=138292&r2=138293&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/reg-list.s (original)
+++ llvm/trunk/test/MC/ARM/reg-list.s Mon Aug 22 18:13:54 2011
@@ -1,6 +1,6 @@
@ RUN: llvm-mc -triple thumb-apple-darwin10 -show-encoding < %s 2> %t | FileCheck %s
@ RUN: FileCheck --check-prefix=CHECK-WARNINGS < %t %s
-
+
push {r7, lr}
@ CHECK-WARNINGS: register not in ascending order in register list
From resistor at mac.com Mon Aug 22 18:16:48 2011
From: resistor at mac.com (Owen Anderson)
Date: Mon, 22 Aug 2011 23:16:48 -0000
Subject: [llvm-commits] [llvm] r138294 -
/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
Message-ID: <20110822231648.CD9ED2A6C12C@llvm.org>
Author: resistor
Date: Mon Aug 22 18:16:48 2011
New Revision: 138294
URL: http://llvm.org/viewvc/llvm-project?rev=138294&view=rev
Log:
Match operand names to provide correct decoding for Thumb2 SMULL.
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=138294&r1=138293&r2=138294&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Mon Aug 22 18:16:48 2011
@@ -2153,9 +2153,9 @@
let neverHasSideEffects = 1 in {
let isCommutable = 1 in {
def t2SMULL : T2MulLong<0b000, 0b0000,
- (outs rGPR:$Rd, rGPR:$Ra),
+ (outs rGPR:$RdLo, rGPR:$RdHi),
(ins rGPR:$Rn, rGPR:$Rm), IIC_iMUL64,
- "smull", "\t$Rd, $Ra, $Rn, $Rm", []>;
+ "smull", "\t$RdLo, $RdHi, $Rn, $Rm", []>;
def t2UMULL : T2MulLong<0b010, 0b0000,
(outs rGPR:$RdLo, rGPR:$RdHi),
From grosbach at apple.com Mon Aug 22 18:17:34 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 22 Aug 2011 23:17:34 -0000
Subject: [llvm-commits] [llvm] r138295 - in /llvm/trunk:
lib/Target/ARM/AsmParser/ARMAsmParser.cpp test/MC/ARM/thumb-diagnostics.s
Message-ID: <20110822231734.98B5B2A6C12C@llvm.org>
Author: grosbach
Date: Mon Aug 22 18:17:34 2011
New Revision: 138295
URL: http://llvm.org/viewvc/llvm-project?rev=138295&view=rev
Log:
Improve error checking for tPUSH and tPOP register lists.
Modified:
llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
llvm/trunk/test/MC/ARM/thumb-diagnostics.s
Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=138295&r1=138294&r2=138295&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Mon Aug 22 18:17:34 2011
@@ -3109,6 +3109,26 @@
break;
}
+ case ARM::tPOP: {
+ for (unsigned i = 2; i < Inst.getNumOperands(); ++i) {
+ unsigned Reg = Inst.getOperand(i).getReg();
+ // Anything other than a low register isn't legal here.
+ if (!isARMLowRegister(Reg) && Reg != ARM::PC)
+ return Error(Operands[2]->getStartLoc(),
+ "registers must be in range r0-r7 or pc");
+ }
+ break;
+ }
+ case ARM::tPUSH: {
+ for (unsigned i = 2; i < Inst.getNumOperands(); ++i) {
+ unsigned Reg = Inst.getOperand(i).getReg();
+ // Anything other than a low register isn't legal here.
+ if (!isARMLowRegister(Reg) && Reg != ARM::LR)
+ return Error(Operands[2]->getStartLoc(),
+ "registers must be in range r0-r7 or lr");
+ }
+ break;
+ }
}
return false;
Modified: llvm/trunk/test/MC/ARM/thumb-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/thumb-diagnostics.s?rev=138295&r1=138294&r2=138295&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/thumb-diagnostics.s (original)
+++ llvm/trunk/test/MC/ARM/thumb-diagnostics.s Mon Aug 22 18:17:34 2011
@@ -57,6 +57,18 @@
@ CHECK-ERRORS: ^
+@ Invalid writeback and register lists for PUSH/POP
+ pop {r1, r2, r10}
+ push {r8, r9}
+@ CHECK-ERRORS: error: registers must be in range r0-r7 or pc
+@ CHECK-ERRORS: pop {r1, r2, r10}
+@ CHECK-ERRORS: ^
+@ CHECK-ERRORS: error: registers must be in range r0-r7 or lr
+@ CHECK-ERRORS: push {r8, r9}
+@ CHECK-ERRORS: ^
+
+
+
@ Out of range immediates for LSL instruction.
lsls r4, r5, #-1
lsls r4, r5, #32
From geek4civic at gmail.com Mon Aug 22 18:22:05 2011
From: geek4civic at gmail.com (NAKAMURA Takumi)
Date: Mon, 22 Aug 2011 23:22:05 -0000
Subject: [llvm-commits] [llvm] r138297 - /llvm/trunk/docs/ReleaseNotes.html
Message-ID: <20110822232205.B9D482A6C12C@llvm.org>
Author: chapuni
Date: Mon Aug 22 18:22:05 2011
New Revision: 138297
URL: http://llvm.org/viewvc/llvm-project?rev=138297&view=rev
Log:
docs/ReleaseNotes.html: Mention that Windows 2000 will not be supported any more.
Modified:
llvm/trunk/docs/ReleaseNotes.html
Modified: llvm/trunk/docs/ReleaseNotes.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=138297&r1=138296&r2=138297&view=diff
==============================================================================
--- llvm/trunk/docs/ReleaseNotes.html (original)
+++ llvm/trunk/docs/ReleaseNotes.html Mon Aug 22 18:22:05 2011
@@ -589,6 +589,14 @@
is still accepted, but is now considered deprecated.
+
Windows (32-bit)
+
+
+
On Win32(MinGW32 and MSVC), Windows 2000 will not be supported.
+ Windows XP or higher is required.
+
+
+
From resistor at mac.com Mon Aug 22 18:22:06 2011
From: resistor at mac.com (Owen Anderson)
Date: Mon, 22 Aug 2011 23:22:06 -0000
Subject: [llvm-commits] [llvm] r138298 - in /llvm/trunk:
lib/Target/ARM/ARMInstrThumb2.td test/MC/Disassembler/ARM/thumb-tests.txt
Message-ID: <20110822232206.3425F2A6C12D@llvm.org>
Author: resistor
Date: Mon Aug 22 18:22:05 2011
New Revision: 138298
URL: http://llvm.org/viewvc/llvm-project?rev=138298&view=rev
Log:
Match operand naming to allow correct decoding of t2LDRSH_POST.
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt
Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=138298&r1=138297&r2=138298&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Mon Aug 22 18:22:05 2011
@@ -1238,10 +1238,10 @@
AddrModeT2_i8, IndexModePre, IIC_iLoad_bh_iu,
"ldrsh", "\t$Rt, $addr!", "$addr.base = $Rn",
[]>;
-def t2LDRSH_POST : T2Iidxldst<1, 0b01, 1, 0, (outs GPR:$dst, GPR:$Rn),
+def t2LDRSH_POST : T2Iidxldst<1, 0b01, 1, 0, (outs GPR:$Rt, GPR:$Rn),
(ins GPR:$base, t2am_imm8_offset:$addr),
AddrModeT2_i8, IndexModePost, IIC_iLoad_bh_iu,
- "ldrsh", "\t$dst, [$Rn], $addr", "$base = $Rn",
+ "ldrsh", "\t$Rt, [$Rn], $addr", "$base = $Rn",
[]>;
} // mayLoad = 1, neverHasSideEffects = 1
Modified: llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt?rev=138298&r1=138297&r2=138298&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt (original)
+++ llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt Mon Aug 22 18:22:05 2011
@@ -277,3 +277,6 @@
# CHECK: and.w r5, r1, r10, ror #7
0x1 0xea 0xfa 0x95
+
+# CHECK: ldrsh r6, [sp], #81
+0x3d 0xf9 0x51 0x6b
From grosbach at apple.com Mon Aug 22 18:25:04 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 22 Aug 2011 16:25:04 -0700
Subject: [llvm-commits] [llvm] r138289 -
/llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp
In-Reply-To: <20110822230456.598B52A6C12C@llvm.org>
References: <20110822230456.598B52A6C12C@llvm.org>
Message-ID: <3930F884-0000-4570-9945-38C0DA87927F@apple.com>
Hey Evan,
Thanks for the fix. I'm open to suggestions on how to create a non-fragile test case for something like this. I can reduce the code that failed because of it easily enough, but that'll be pretty fragile such that changes in either isel or the register allocator would likely perturb it. The failure was detected by the nightly test suite. While not optimal, perhaps that's sufficient?
-Jim
On Aug 22, 2011, at 4:04 PM, Evan Cheng wrote:
> Author: evancheng
> Date: Mon Aug 22 18:04:56 2011
> New Revision: 138289
>
> URL: http://llvm.org/viewvc/llvm-project?rev=138289&view=rev
> Log:
> Follow up to Jim's r138278. This fixes commuteInstruction so it handles two-address instructions correctly. I'll let Jim add a test case. :-)
>
> Modified:
> llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp
>
> Modified: llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp?rev=138289&r1=138288&r2=138289&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp (original)
> +++ llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp Mon Aug 22 18:04:56 2011
> @@ -74,23 +74,25 @@
>
> assert(MI->getOperand(Idx1).isReg() && MI->getOperand(Idx2).isReg() &&
> "This only knows how to commute register operands so far");
> + unsigned Reg0 = HasDef ? MI->getOperand(0).getReg() : 0;
> unsigned Reg1 = MI->getOperand(Idx1).getReg();
> unsigned Reg2 = MI->getOperand(Idx2).getReg();
> bool Reg1IsKill = MI->getOperand(Idx1).isKill();
> bool Reg2IsKill = MI->getOperand(Idx2).isKill();
> - bool ChangeReg0 = false;
> - if (HasDef && MI->getOperand(0).getReg() == Reg1) {
> - // Must be two address instruction!
> - assert(MI->getDesc().getOperandConstraint(0, MCOI::TIED_TO) &&
> - "Expecting a two-address instruction!");
> + // If destination is tied to either of the commuted source register, then
> + // it must be updated.
> + if (HasDef && Reg0 == Reg1 &&
> + MI->getDesc().getOperandConstraint(Idx1, MCOI::TIED_TO) == 0) {
> Reg2IsKill = false;
> - ChangeReg0 = true;
> + Reg0 = Reg2;
> + } else if (HasDef && Reg0 == Reg2 &&
> + MI->getDesc().getOperandConstraint(Idx2, MCOI::TIED_TO) == 0) {
> + Reg1IsKill = false;
> + Reg0 = Reg1;
> }
>
> if (NewMI) {
> // Create a new instruction.
> - unsigned Reg0 = HasDef
> - ? (ChangeReg0 ? Reg2 : MI->getOperand(0).getReg()) : 0;
> bool Reg0IsDead = HasDef ? MI->getOperand(0).isDead() : false;
> MachineFunction &MF = *MI->getParent()->getParent();
> if (HasDef)
> @@ -104,8 +106,8 @@
> .addReg(Reg1, getKillRegState(Reg2IsKill));
> }
>
> - if (ChangeReg0)
> - MI->getOperand(0).setReg(Reg2);
> + if (HasDef)
> + MI->getOperand(0).setReg(Reg0);
> MI->getOperand(Idx2).setReg(Reg1);
> MI->getOperand(Idx1).setReg(Reg2);
> MI->getOperand(Idx2).setIsKill(Reg1IsKill);
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
From grosbach at apple.com Mon Aug 22 18:25:49 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 22 Aug 2011 23:25:49 -0000
Subject: [llvm-commits] [llvm] r138299 -
/llvm/trunk/lib/Target/ARM/ARMInstrThumb.td
Message-ID: <20110822232549.1C2BA2A6C12C@llvm.org>
Author: grosbach
Date: Mon Aug 22 18:25:48 2011
New Revision: 138299
URL: http://llvm.org/viewvc/llvm-project?rev=138299&view=rev
Log:
Revert r138278 now that r138289 has fixed the root issue.
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrThumb.td
Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb.td?rev=138299&r1=138298&r2=138299&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrThumb.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Mon Aug 22 18:25:48 2011
@@ -1047,7 +1047,7 @@
} // neverHasSideEffects
// Multiply register
-//let isCommutable = 1 in
+let isCommutable = 1 in
def tMUL : // A8.6.105 T1
Thumb1sI<(outs tGPR:$Rd), (ins tGPR:$Rn, tGPR:$Rm), AddrModeNone, 2,
IIC_iMUL32, "mul", "\t$Rd, $Rn, $Rm", "$Rm = $Rd",
From resistor at mac.com Mon Aug 22 18:27:47 2011
From: resistor at mac.com (Owen Anderson)
Date: Mon, 22 Aug 2011 23:27:47 -0000
Subject: [llvm-commits] [llvm] r138300 - in /llvm/trunk:
lib/Target/ARM/ARMInstrThumb2.td test/MC/Disassembler/ARM/thumb-tests.txt
Message-ID: <20110822232747.7B9AD2A6C12C@llvm.org>
Author: resistor
Date: Mon Aug 22 18:27:47 2011
New Revision: 138300
URL: http://llvm.org/viewvc/llvm-project?rev=138300&view=rev
Log:
Correct operand naming of t2USAT16 to allow proper decoding.
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt
Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=138300&r1=138299&r2=138300&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Mon Aug 22 18:27:47 2011
@@ -1902,9 +1902,9 @@
let Inst{15} = 0;
}
-def t2USAT16: T2SatI<(outs rGPR:$dst), (ins i32imm:$sat_imm, rGPR:$Rn),
+def t2USAT16: T2SatI<(outs rGPR:$Rd), (ins i32imm:$sat_imm, rGPR:$Rn),
NoItinerary,
- "usat16", "\t$dst, $sat_imm, $Rn",
+ "usat16", "\t$Rd, $sat_imm, $Rn",
[/* For disassembly only; pattern left blank */]>,
Requires<[IsThumb2, HasThumb2DSP]> {
let Inst{31-27} = 0b11110;
Modified: llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt?rev=138300&r1=138299&r2=138300&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt (original)
+++ llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt Mon Aug 22 18:27:47 2011
@@ -280,3 +280,6 @@
# CHECK: ldrsh r6, [sp], #81
0x3d 0xf9 0x51 0x6b
+
+# CHECK: usat16 r4, #10, r1
+0xa1 0xf3 0x2a 0x4
From resistor at mac.com Mon Aug 22 18:31:45 2011
From: resistor at mac.com (Owen Anderson)
Date: Mon, 22 Aug 2011 23:31:45 -0000
Subject: [llvm-commits] [llvm] r138301 - in /llvm/trunk:
lib/Target/ARM/ARMInstrThumb2.td test/MC/Disassembler/ARM/thumb-tests.txt
Message-ID: <20110822233145.A27D22A6C12C@llvm.org>
Author: resistor
Date: Mon Aug 22 18:31:45 2011
New Revision: 138301
URL: http://llvm.org/viewvc/llvm-project?rev=138301&view=rev
Log:
t2SMLAD is a four-register instruction, not a three-register one.
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt
Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=138301&r1=138300&r2=138301&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Mon Aug 22 18:31:45 2011
@@ -2457,7 +2457,7 @@
Requires<[IsThumb2, HasThumb2DSP]> {
let Inst{15-12} = 0b1111;
}
-def t2SMLAD : T2ThreeReg_mac<
+def t2SMLAD : T2FourReg_mac<
0, 0b010, 0b0000, (outs rGPR:$Rd),
(ins rGPR:$Rn, rGPR:$Rm, rGPR:$Ra), IIC_iMAC32, "smlad",
"\t$Rd, $Rn, $Rm, $Ra", []>,
Modified: llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt?rev=138301&r1=138300&r2=138301&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt (original)
+++ llvm/trunk/test/MC/Disassembler/ARM/thumb-tests.txt Mon Aug 22 18:31:45 2011
@@ -283,3 +283,6 @@
# CHECK: usat16 r4, #10, r1
0xa1 0xf3 0x2a 0x4
+
+# CHECK: smlad r5, r12, r8, r11
+0x2c 0xfb 0x8 0xb5
From isanbard at gmail.com Mon Aug 22 18:38:40 2011
From: isanbard at gmail.com (Bill Wendling)
Date: Mon, 22 Aug 2011 23:38:40 -0000
Subject: [llvm-commits] [llvm] r138302 -
/llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp
Message-ID: <20110822233840.4F5562A6C12D@llvm.org>
Author: void
Date: Mon Aug 22 18:38:40 2011
New Revision: 138302
URL: http://llvm.org/viewvc/llvm-project?rev=138302&view=rev
Log:
Split the landing pad's edge. Then for all uses of a landingpad instruction's
value, we insert a load of the exception object and selector object from memory,
which is where it actually resides. If it's used by a PHI node, we follow that
to where it is being used. Eventually, all landingpad instructions should have
no uses. Any PHI nodes that were associated with those landingpads should be
removed.
Modified:
llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp
Modified: llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp?rev=138302&r1=138301&r2=138302&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp (original)
+++ llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp Mon Aug 22 18:38:40 2011
@@ -26,6 +26,7 @@
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Support/Debug.h"
+#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include
@@ -52,6 +53,7 @@
Constant *CallSiteFn;
Constant *DispatchSetupFn;
Value *CallSite;
+ DenseMap LPadSuccMap;
public:
static char ID; // Pass identification, replacement for typeid
explicit SjLjEHPass(const TargetLowering *tli = NULL)
@@ -158,7 +160,12 @@
CallInst::Create(CallSiteFn, CallSiteNoC, "", II);
// Add a switch case to our unwind block.
- CatchSwitch->addCase(SwitchValC, II->getUnwindDest());
+ if (BasicBlock *SuccBB = LPadSuccMap[II]) {
+ CatchSwitch->addCase(SwitchValC, SuccBB);
+ } else {
+ CatchSwitch->addCase(SwitchValC, II->getUnwindDest());
+ }
+
// We still want this to look like an invoke so we emit the LSDA properly,
// so we don't transform the invoke into a call here.
}
@@ -184,7 +191,17 @@
for (unsigned i = 0, e = Invokes.size(); i != e; ++i) {
InvokeInst *II = Invokes[i];
SplitCriticalEdge(II, 0, this);
- SplitCriticalEdge(II, 1, this);
+
+ // FIXME: New EH - This if-condition will be always true in the new scheme.
+ if (II->getUnwindDest()->isLandingPad()) {
+ SmallVector NewBBs;
+ SplitLandingPadPredecessors(II->getUnwindDest(), II->getParent(),
+ ".1", ".2", this, NewBBs);
+ LPadSuccMap[II] = *succ_begin(NewBBs[0]);
+ } else {
+ SplitCriticalEdge(II, 1, this);
+ }
+
assert(!isa(II->getNormalDest()) &&
!isa(II->getUnwindDest()) &&
"Critical edge splitting left single entry phi nodes?");
@@ -296,6 +313,44 @@
}
}
+/// CreateLandingPadLoad - Load the exception handling values and insert them
+/// into a structure.
+static Instruction *CreateLandingPadLoad(Function &F, Value *ExnAddr,
+ Value *SelAddr,
+ BasicBlock::iterator InsertPt) {
+ Value *Exn = new LoadInst(ExnAddr, "exn", false,
+ InsertPt);
+ Type *Ty = Type::getInt8PtrTy(F.getContext());
+ Exn = CastInst::Create(Instruction::IntToPtr, Exn, Ty, "", InsertPt);
+ Value *Sel = new LoadInst(SelAddr, "sel", false, InsertPt);
+
+ Ty = StructType::get(Exn->getType(), Sel->getType(), NULL);
+ InsertValueInst *LPadVal = InsertValueInst::Create(llvm::UndefValue::get(Ty),
+ Exn, 0,
+ "lpad.val", InsertPt);
+ return InsertValueInst::Create(LPadVal, Sel, 1, "lpad.val", InsertPt);
+}
+
+/// ReplaceLandingPadVal - Replace the landingpad instruction's value with a
+/// load from the stored values (via CreateLandingPadLoad). This looks through
+/// PHI nodes, and removes them if they are dead.
+static void ReplaceLandingPadVal(Function &F, Instruction *Inst, Value *ExnAddr,
+ Value *SelAddr) {
+ if (Inst->use_empty()) return;
+
+ while (!Inst->use_empty()) {
+ Instruction *I = cast(Inst->use_back());
+
+ if (PHINode *PN = dyn_cast(I)) {
+ ReplaceLandingPadVal(F, PN, ExnAddr, SelAddr);
+ if (PN->use_empty()) PN->eraseFromParent();
+ continue;
+ }
+
+ Inst->replaceAllUsesWith(CreateLandingPadLoad(F, ExnAddr, SelAddr, I));
+ }
+}
+
bool SjLjEHPass::insertSjLjEHSupport(Function &F) {
SmallVector Returns;
SmallVector Unwinds;
@@ -350,6 +405,10 @@
}
} else if (AllocaInst *AI = dyn_cast(I)) {
JmpbufUpdatePoints.push_back(AI);
+ } else if (InvokeInst *II = dyn_cast(I)) {
+ // FIXME: This will be always non-NULL in the new EH.
+ if (LandingPadInst *LPI = II->getUnwindDest()->getLandingPadInst())
+ if (!PersonalityFn) PersonalityFn = LPI->getPersonalityFn();
}
}
}
@@ -368,6 +427,16 @@
// invoke's.
splitLiveRangesAcrossInvokes(Invokes);
+
+ SmallVector LandingPads;
+ for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) {
+ if (InvokeInst *II = dyn_cast(BB->getTerminator()))
+ // FIXME: This will be always non-NULL in the new EH.
+ if (LandingPadInst *LPI = II->getUnwindDest()->getLandingPadInst())
+ LandingPads.push_back(LPI);
+ }
+
+
BasicBlock *EntryBB = F.begin();
// Create an alloca for the incoming jump buffer ptr and the new jump buffer
// that needs to be restored on all exits from the function. This is an
@@ -425,6 +494,9 @@
I->eraseFromParent();
}
+ for (unsigned i = 0, e = LandingPads.size(); i != e; ++i)
+ ReplaceLandingPadVal(F, LandingPads[i], ExceptionAddr, SelectorAddr);
+
// The entry block changes to have the eh.sjlj.setjmp, with a conditional
// branch to a dispatch block for non-zero returns. If we return normally,
// we're not handling an exception and just register the function context and
From grosbach at apple.com Mon Aug 22 18:39:25 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 22 Aug 2011 23:39:25 -0000
Subject: [llvm-commits] [llvm] r138303 -
/llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
Message-ID: <20110822233925.D85EE2A6C12D@llvm.org>
Author: grosbach
Date: Mon Aug 22 18:39:25 2011
New Revision: 138303
URL: http://llvm.org/viewvc/llvm-project?rev=138303&view=rev
Log:
Thumb parsing and encoding for REV/REV16/REVSH.
Modified:
llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
Modified: llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/basic-thumb-instructions.s?rev=138303&r1=138302&r2=138303&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/basic-thumb-instructions.s (original)
+++ llvm/trunk/test/MC/ARM/basic-thumb-instructions.s Mon Aug 22 18:39:25 2011
@@ -379,3 +379,15 @@
push {r1, r2, r7}
@ CHECK: push {r1, r2, r7} @ encoding: [0x86,0xb4]
+
+
+ at ------------------------------------------------------------------------------
+@ REV/REV16/REVSH
+ at ------------------------------------------------------------------------------
+ rev r6, r3
+ rev16 r7, r2
+ revsh r5, r1
+
+@ CHECK: rev r6, r3 @ encoding: [0x1e,0xba]
+@ CHECK: rev16 r7, r2 @ encoding: [0x57,0xba]
+@ CHECK: revsh r5, r1 @ encoding: [0xcd,0xba]
From grosbach at apple.com Mon Aug 22 18:40:51 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 22 Aug 2011 23:40:51 -0000
Subject: [llvm-commits] [llvm] r138304 -
/llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
Message-ID: <20110822234051.BB0572A6C12D@llvm.org>
Author: grosbach
Date: Mon Aug 22 18:40:51 2011
New Revision: 138304
URL: http://llvm.org/viewvc/llvm-project?rev=138304&view=rev
Log:
Thumb parsing and encoding for ROR.
Modified:
llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
Modified: llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/basic-thumb-instructions.s?rev=138304&r1=138303&r2=138304&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/basic-thumb-instructions.s (original)
+++ llvm/trunk/test/MC/ARM/basic-thumb-instructions.s Mon Aug 22 18:40:51 2011
@@ -391,3 +391,11 @@
@ CHECK: rev r6, r3 @ encoding: [0x1e,0xba]
@ CHECK: rev16 r7, r2 @ encoding: [0x57,0xba]
@ CHECK: revsh r5, r1 @ encoding: [0xcd,0xba]
+
+
+ at ------------------------------------------------------------------------------
+@ ROR
+ at ------------------------------------------------------------------------------
+ rors r2, r7
+
+@ CHECK: rors r2, r7 @ encoding: [0xfa,0x41]
From benny.kra at googlemail.com Mon Aug 22 18:41:41 2011
From: benny.kra at googlemail.com (Benjamin Kramer)
Date: Mon, 22 Aug 2011 23:41:41 -0000
Subject: [llvm-commits] [llvm] r138305 -
/llvm/trunk/include/llvm/MC/MCInstrAnalysis.h
Message-ID: <20110822234141.698EF2A6C12D@llvm.org>
Author: d0k
Date: Mon Aug 22 18:41:41 2011
New Revision: 138305
URL: http://llvm.org/viewvc/llvm-project?rev=138305&view=rev
Log:
Add an MCInstrAnalysis version of isCall.
Modified:
llvm/trunk/include/llvm/MC/MCInstrAnalysis.h
Modified: llvm/trunk/include/llvm/MC/MCInstrAnalysis.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCInstrAnalysis.h?rev=138305&r1=138304&r2=138305&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCInstrAnalysis.h (original)
+++ llvm/trunk/include/llvm/MC/MCInstrAnalysis.h Mon Aug 22 18:41:41 2011
@@ -43,6 +43,10 @@
return Info->get(Inst.getOpcode()).isIndirectBranch();
}
+ virtual bool isCall(const MCInst &Inst) const {
+ return Info->get(Inst.getOpcode()).isCall();
+ }
+
virtual bool isReturn(const MCInst &Inst) const {
return Info->get(Inst.getOpcode()).isReturn();
}
From resistor at mac.com Mon Aug 22 18:44:04 2011
From: resistor at mac.com (Owen Anderson)
Date: Mon, 22 Aug 2011 23:44:04 -0000
Subject: [llvm-commits] [llvm] r138306 - in /llvm/trunk/lib/Target/ARM:
ARMInstrFormats.td Disassembler/ARMDisassembler.cpp
Message-ID: <20110822234404.7E3F82A6C12D@llvm.org>
Author: resistor
Date: Mon Aug 22 18:44:04 2011
New Revision: 138306
URL: http://llvm.org/viewvc/llvm-project?rev=138306&view=rev
Log:
Reject invalid imod values in t2CPS instructions.
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrFormats.td
llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMInstrFormats.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrFormats.td?rev=138306&r1=138305&r2=138306&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrFormats.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrFormats.td Mon Aug 22 18:44:04 2011
@@ -134,6 +134,7 @@
// ARM imod and iflag operands, used only by the CPS instruction.
def imod_op : Operand {
let PrintMethod = "printCPSIMod";
+ let DecoderMethod = "DecodeCPSIMod";
}
def ProcIFlagsOperand : AsmOperandClass {
Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp?rev=138306&r1=138305&r2=138306&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp (original)
+++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp Mon Aug 22 18:44:04 2011
@@ -179,7 +179,8 @@
uint64_t Address, const void *Decoder);
static DecodeStatus DecodeVMOVRRS(llvm::MCInst &Inst, unsigned Insn,
uint64_t Address, const void *Decoder);
-
+static DecodeStatus DecodeCPSIMod(llvm::MCInst &Inst, unsigned Insn,
+ uint64_t Address, const void *Decoder);
static DecodeStatus DecodeThumbAddSpecialReg(llvm::MCInst &Inst, uint16_t Insn,
uint64_t Address, const void *Decoder);
@@ -3240,3 +3241,11 @@
return S;
}
+
+static DecodeStatus DecodeCPSIMod(llvm::MCInst &Inst, unsigned Val,
+ uint64_t Address, const void *Decoder) {
+ if (Val == 0x1) return Fail;
+ Inst.addOperand(MCOperand::CreateImm(Val));
+ return Success;
+}
+
From grosbach at apple.com Mon Aug 22 18:47:13 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 22 Aug 2011 23:47:13 -0000
Subject: [llvm-commits] [llvm] r138308 - in /llvm/trunk:
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
test/MC/ARM/basic-thumb-instructions.s
Message-ID: <20110822234713.AB7C12A6C12D@llvm.org>
Author: grosbach
Date: Mon Aug 22 18:47:13 2011
New Revision: 138308
URL: http://llvm.org/viewvc/llvm-project?rev=138308&view=rev
Log:
Thumb parsing and encoding for RSB.
Modified:
llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=138308&r1=138307&r2=138308&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Mon Aug 22 18:47:13 2011
@@ -3029,6 +3029,19 @@
delete Op;
}
}
+ // Similarly, the Thumb1 "RSB" instruction has a literal "#0" on the
+ // end. Convert it to a token here.
+ if (Mnemonic == "rsb" && isThumb() && Operands.size() == 6 &&
+ static_cast(Operands[5])->isImm()) {
+ ARMOperand *Op = static_cast(Operands[5]);
+ const MCConstantExpr *CE = dyn_cast(Op->getImm());
+ if (CE && CE->getValue() == 0) {
+ Operands.erase(Operands.begin() + 5);
+ Operands.push_back(ARMOperand::CreateToken("#0", Op->getStartLoc()));
+ delete Op;
+ }
+ }
+
return false;
}
Modified: llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/basic-thumb-instructions.s?rev=138308&r1=138307&r2=138308&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/basic-thumb-instructions.s (original)
+++ llvm/trunk/test/MC/ARM/basic-thumb-instructions.s Mon Aug 22 18:47:13 2011
@@ -399,3 +399,11 @@
rors r2, r7
@ CHECK: rors r2, r7 @ encoding: [0xfa,0x41]
+
+
+ at ------------------------------------------------------------------------------
+@ RSB
+ at ------------------------------------------------------------------------------
+ rsbs r1, r3, #0
+
+ rsbs r1, r3, #0 @ encoding: [0x59,0x42]
From grosbach at apple.com Mon Aug 22 18:55:59 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 22 Aug 2011 23:55:59 -0000
Subject: [llvm-commits] [llvm] r138311 - in /llvm/trunk:
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
test/MC/ARM/basic-thumb-instructions.s
Message-ID: <20110822235559.1B3ED2A6C12C@llvm.org>
Author: grosbach
Date: Mon Aug 22 18:55:58 2011
New Revision: 138311
URL: http://llvm.org/viewvc/llvm-project?rev=138311&view=rev
Log:
Thumb parsing and encoding for SBC.
Modified:
llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=138311&r1=138310&r2=138311&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Mon Aug 22 18:55:58 2011
@@ -2755,7 +2755,8 @@
// predicated but do have a carry-set and so weren't caught above.
if (Mnemonic != "adcs" && Mnemonic != "bics" && Mnemonic != "movs" &&
Mnemonic != "muls" && Mnemonic != "smlals" && Mnemonic != "smulls" &&
- Mnemonic != "umlals" && Mnemonic != "umulls" && Mnemonic != "lsls") {
+ Mnemonic != "umlals" && Mnemonic != "umulls" && Mnemonic != "lsls" &&
+ Mnemonic != "sbcs") {
unsigned CC = StringSwitch(Mnemonic.substr(Mnemonic.size()-2))
.Case("eq", ARMCC::EQ)
.Case("ne", ARMCC::NE)
Modified: llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/basic-thumb-instructions.s?rev=138311&r1=138310&r2=138311&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/basic-thumb-instructions.s (original)
+++ llvm/trunk/test/MC/ARM/basic-thumb-instructions.s Mon Aug 22 18:55:58 2011
@@ -406,4 +406,12 @@
@------------------------------------------------------------------------------
rsbs r1, r3, #0
- rsbs r1, r3, #0 @ encoding: [0x59,0x42]
+@ CHECK: rsbs r1, r3, #0 @ encoding: [0x59,0x42]
+
+
+ at ------------------------------------------------------------------------------
+@ SBC
+ at ------------------------------------------------------------------------------
+ sbcs r4, r3
+
+@ CHECK: sbcs r4, r3 @ encoding: [0x9c,0x41]
From grosbach at apple.com Mon Aug 22 18:58:03 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 22 Aug 2011 23:58:03 -0000
Subject: [llvm-commits] [llvm] r138312 -
/llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
Message-ID: <20110822235803.2125A2A6C12C@llvm.org>
Author: grosbach
Date: Mon Aug 22 18:58:02 2011
New Revision: 138312
URL: http://llvm.org/viewvc/llvm-project?rev=138312&view=rev
Log:
Thumb parsing and encoding for SETEND.
Modified:
llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
Modified: llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/basic-thumb-instructions.s?rev=138312&r1=138311&r2=138312&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/basic-thumb-instructions.s (original)
+++ llvm/trunk/test/MC/ARM/basic-thumb-instructions.s Mon Aug 22 18:58:02 2011
@@ -415,3 +415,13 @@
sbcs r4, r3
@ CHECK: sbcs r4, r3 @ encoding: [0x9c,0x41]
+
+
+ at ------------------------------------------------------------------------------
+@ SETEND
+ at ------------------------------------------------------------------------------
+ setend be
+ setend le
+
+@ CHECK: setend be @ encoding: [0x58,0xb6]
+@ CHECK: setend le @ encoding: [0x50,0xb6]
From kcc at google.com Mon Aug 22 19:46:43 2011
From: kcc at google.com (Kostya Serebryany)
Date: Mon, 22 Aug 2011 17:46:43 -0700
Subject: [llvm-commits] AddressSanitizer, first patch
In-Reply-To:
References:
Message-ID:
Hi,
I've updated the patch after Nick's comments.
http://codereview.appspot.com/4867059/
--kcc
On Fri, Aug 19, 2011 at 11:14 AM, Kostya Serebryany wrote:
> Hello llvm-commits,
>
> I would ask you to consider the following patch, which adds the basic
> functionality of AddressSanitizer, a memory error detector.
>
> Quick description:
> The tool finds stack and heap out-of-bound bugs and use-after-free bugs.
> It consists of an LLVM instrumentation pass and a run-time library which
> replaces malloc.
> The LLVM pass instruments all memory accesses and inserts redzones around
> stack objects and globals.
> The run-time library inserts redzones around heap objects and handles
> error reporting.
> The slowdown introduced by the tool varies between 1.5x and 2.5x (on
> CPU2006 the average is 1.73x).
>
> Until now the tool was developed as a separate project.
> It has been quite successful at finding bugs for the Chromium browser
> project
> (
> http://blog.chromium.org/2011/06/testing-chromium-addresssanitizer-fast.html
> )
> and other pieces of Google code.
>
> For the full description of the tool please read
> http://code.google.com/p/address-sanitizer/wiki/AddressSanitizer
>
> http://code.google.com/p/address-sanitizer/wiki/AddressSanitizerAlgorithm
> http://code.google.com/p/address-sanitizer/wiki/PerformanceNumbers
>
>
> This patch adds the basic instrumentation functionality (w/o stack and
> global redzones) and one test.
>
> If/when this patch is submitted, the following patches will follow:
> clang/driver support (flags, etc)
> stack/globals support
> run-time librrary
> integration tests
>
> The patch file is attached, or it can be viewed at
> http://codereview.appspot.com/4867059/
>
> Thanks,
>
> --kcc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110822/4b7927c2/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: issue4867059_11001.diff
Type: text/x-patch
Size: 26659 bytes
Desc: not available
Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110822/4b7927c2/attachment.bin
From bruno.cardoso at gmail.com Mon Aug 22 20:14:17 2011
From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes)
Date: Tue, 23 Aug 2011 01:14:17 -0000
Subject: [llvm-commits] [llvm] r138317 - in /llvm/trunk:
lib/Target/X86/CMakeLists.txt lib/Target/X86/X86.h
lib/Target/X86/X86TargetMachine.cpp lib/Target/X86/X86VZeroUpper.cpp
test/CodeGen/X86/avx-vzeroupper.ll
Message-ID: <20110823011418.004A82A6C12C@llvm.org>
Author: bruno
Date: Mon Aug 22 20:14:17 2011
New Revision: 138317
URL: http://llvm.org/viewvc/llvm-project?rev=138317&view=rev
Log:
Introduce a pass to insert vzeroupper instructions to avoid AVX to
SSE transition penalty. The pass is enabled through the "x86-use-vzeroupper"
llc command line option. This is only the first step (very naive and
conservative one) to sketch out the idea, but proper DFA is coming next
to allow smarter decisions. Comments and ideas now and in further commits
will be very appreciated.
Added:
llvm/trunk/lib/Target/X86/X86VZeroUpper.cpp
llvm/trunk/test/CodeGen/X86/avx-vzeroupper.ll
Modified:
llvm/trunk/lib/Target/X86/CMakeLists.txt
llvm/trunk/lib/Target/X86/X86.h
llvm/trunk/lib/Target/X86/X86TargetMachine.cpp
Modified: llvm/trunk/lib/Target/X86/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/CMakeLists.txt?rev=138317&r1=138316&r2=138317&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/CMakeLists.txt (original)
+++ llvm/trunk/lib/Target/X86/CMakeLists.txt Mon Aug 22 20:14:17 2011
@@ -32,6 +32,7 @@
X86Subtarget.cpp
X86TargetMachine.cpp
X86TargetObjectFile.cpp
+ X86VZeroUpper.cpp
)
if( CMAKE_CL_64 )
Modified: llvm/trunk/lib/Target/X86/X86.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86.h?rev=138317&r1=138316&r2=138317&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86.h (original)
+++ llvm/trunk/lib/Target/X86/X86.h Mon Aug 22 20:14:17 2011
@@ -48,6 +48,11 @@
/// crossings.
FunctionPass *createSSEDomainFixPass();
+/// createX86IssueVZeroUpperPass - This pass inserts AVX vzeroupper instructions
+/// before each call to avoid transition penalty between functions encoded with
+/// AVX and SSE.
+FunctionPass *createX86IssueVZeroUpperPass();
+
/// createX86CodeEmitterPass - Return a pass that emits the collected X86 code
/// to the specified MCE object.
FunctionPass *createX86JITCodeEmitterPass(X86TargetMachine &TM,
Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.cpp?rev=138317&r1=138316&r2=138317&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Mon Aug 22 20:14:17 2011
@@ -16,6 +16,7 @@
#include "llvm/PassManager.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/Passes.h"
+#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FormattedStream.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/Target/TargetRegistry.h"
@@ -92,6 +93,16 @@
}
//===----------------------------------------------------------------------===//
+// Command line options for x86
+//===----------------------------------------------------------------------===//
+bool UseVZeroUpper;
+
+static cl::opt
+VZeroUpper("x86-use-vzeroupper",
+ cl::desc("Minimize AVX to SSE transition penalty"),
+ cl::location(UseVZeroUpper), cl::init(false));
+
+//===----------------------------------------------------------------------===//
// Pass Pipeline Configuration
//===----------------------------------------------------------------------===//
@@ -125,6 +136,11 @@
PM.add(createSSEDomainFixPass());
return true;
}
+
+ if (Subtarget.hasAVX() && UseVZeroUpper) {
+ PM.add(createX86IssueVZeroUpperPass());
+ return true;
+ }
return false;
}
Added: llvm/trunk/lib/Target/X86/X86VZeroUpper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86VZeroUpper.cpp?rev=138317&view=auto
==============================================================================
--- llvm/trunk/lib/Target/X86/X86VZeroUpper.cpp (added)
+++ llvm/trunk/lib/Target/X86/X86VZeroUpper.cpp Mon Aug 22 20:14:17 2011
@@ -0,0 +1,105 @@
+//===-- X86VZeroUpper.cpp - AVX vzeroupper instruction inserter -----------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the pass which inserts x86 AVX vzeroupper instructions
+// before calls to SSE encoded functions. This avoids transition latency
+// penalty when tranfering control between AVX encoded instructions and old
+// SSE encoding mode.
+//
+//===----------------------------------------------------------------------===//
+
+#define DEBUG_TYPE "x86-codegen"
+#include "X86.h"
+#include "X86InstrInfo.h"
+#include "llvm/ADT/Statistic.h"
+#include "llvm/CodeGen/MachineFunctionPass.h"
+#include "llvm/CodeGen/MachineInstrBuilder.h"
+#include "llvm/CodeGen/Passes.h"
+#include "llvm/GlobalValue.h"
+#include "llvm/Target/TargetInstrInfo.h"
+using namespace llvm;
+
+STATISTIC(NumVZU, "Number of vzeroupper instructions inserted");
+
+namespace {
+ struct VZeroUpperInserter : public MachineFunctionPass {
+ static char ID;
+ VZeroUpperInserter() : MachineFunctionPass(ID) {}
+
+ virtual bool runOnMachineFunction(MachineFunction &MF);
+
+ bool processBasicBlock(MachineFunction &MF, MachineBasicBlock &MBB);
+
+ virtual const char *getPassName() const { return "X86 vzeroupper inserter";}
+
+ private:
+ const TargetInstrInfo *TII; // Machine instruction info.
+ MachineBasicBlock *MBB; // Current basic block
+ };
+ char VZeroUpperInserter::ID = 0;
+}
+
+FunctionPass *llvm::createX86IssueVZeroUpperPass() {
+ return new VZeroUpperInserter();
+}
+
+/// runOnMachineFunction - Loop over all of the basic blocks, inserting
+/// vzero upper instructions before function calls.
+bool VZeroUpperInserter::runOnMachineFunction(MachineFunction &MF) {
+ TII = MF.getTarget().getInstrInfo();
+ bool Changed = false;
+
+ // Process any unreachable blocks in arbitrary order now.
+ for (MachineFunction::iterator BB = MF.begin(), E = MF.end(); BB != E; ++BB)
+ Changed |= processBasicBlock(MF, *BB);
+
+ return Changed;
+}
+
+bool isCallToModuleFn(const MachineInstr *MI) {
+ assert(MI->getDesc().isCall() && "Isn't a call instruction");
+
+ for (int i = 0, e = MI->getNumOperands(); i != e; ++i) {
+ const MachineOperand &MO = MI->getOperand(i);
+
+ if (!MO.isGlobal())
+ continue;
+
+ const GlobalValue *GV = MO.getGlobal();
+ GlobalValue::LinkageTypes LT = GV->getLinkage();
+ if (GV->isInternalLinkage(LT) || GV->isPrivateLinkage(LT) ||
+ (GV->isExternalLinkage(LT) && !GV->isDeclaration()))
+ return true;
+
+ return false;
+ }
+ return false;
+}
+
+/// processBasicBlock - Loop over all of the instructions in the basic block,
+/// inserting vzero upper instructions before function calls.
+bool VZeroUpperInserter::processBasicBlock(MachineFunction &MF,
+ MachineBasicBlock &BB) {
+ bool Changed = false;
+ MBB = &BB;
+
+ for (MachineBasicBlock::iterator I = BB.begin(); I != BB.end(); ++I) {
+ MachineInstr *MI = I;
+ DebugLoc dl = I->getDebugLoc();
+
+ // Insert a vzeroupper instruction before each control transfer
+ // to functions outside this module
+ if (MI->getDesc().isCall() && !isCallToModuleFn(MI)) {
+ BuildMI(*MBB, I, dl, TII->get(X86::VZEROUPPER));
+ ++NumVZU;
+ }
+ }
+
+ return Changed;
+}
Added: llvm/trunk/test/CodeGen/X86/avx-vzeroupper.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx-vzeroupper.ll?rev=138317&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/avx-vzeroupper.ll (added)
+++ llvm/trunk/test/CodeGen/X86/avx-vzeroupper.ll Mon Aug 22 20:14:17 2011
@@ -0,0 +1,26 @@
+; RUN: llc < %s -x86-use-vzeroupper -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s
+
+define <4 x float> @do_sse_local(<4 x float> %a) nounwind uwtable readnone ssp {
+entry:
+ %add.i = fadd <4 x float> %a, %a
+ ret <4 x float> %add.i
+}
+
+; CHECK: _test00
+define <4 x float> @test00(<4 x float> %a, <4 x float> %b) nounwind uwtable ssp {
+entry:
+ %add.i = fadd <4 x float> %a, %b
+ ; CHECK: vzeroupper
+ ; CHECK-NEXT: callq _do_sse
+ %call3 = tail call <4 x float> @do_sse(<4 x float> %add.i) nounwind
+ %sub.i = fsub <4 x float> %call3, %add.i
+ ; CHECK-NOT: vzeroupper
+ ; CHECK: callq _do_sse_local
+ %call8 = tail call <4 x float> @do_sse_local(<4 x float> %sub.i)
+ ; CHECK: vzeroupper
+ ; CHECK-NEXT: jmp _do_sse
+ %call10 = tail call <4 x float> @do_sse(<4 x float> %call8) nounwind
+ ret <4 x float> %call10
+}
+
+declare <4 x float> @do_sse(<4 x float>)
From geek4civic at gmail.com Mon Aug 22 22:39:59 2011
From: geek4civic at gmail.com (NAKAMURA Takumi)
Date: Tue, 23 Aug 2011 12:39:59 +0900
Subject: [llvm-commits] [llvm] r138213 -
/llvm/trunk/lib/Support/Windows/PathV2.inc
In-Reply-To:
References: <20110820213638.9E0D52A6C12C@llvm.org>
Message-ID:
2011/8/21 Aaron Ballman :
> On Sun, Aug 21, 2011 at 9:09 AM, NAKAMURA Takumi wrote:
>>> + ?// First, check to see if this is a device namespace, which always
>>> + ?// starts with \\.\, since device namespaces are not legal file paths.
>>> + ?if (path.startswith("\\\\.\\"))
>>> + ? ?return true;
>>
>> I am not sure, though, I am dubious "\\.\" would be handled here
>> and other methods in PathV2 would be aware of "\\.\".
I am sorry, I mistook and was confused "\\?\" and "\\.\" then.
> Yes, \\.\ is one of those path namespaces that you don't see too
> often. ?But it does definitely signify a namespace that's not a file
> or folder in the traditional sense. ?Since we're already looking for
> non-file devices like "con" and "com", supporting \\.\ seems logical
> to me.
>
> Whether other methods in PathV2 would need to be updated for \\.\,
> that's a good question. ?I was using this more as a safeguard, in case
> it somehow snuck through.
Makes sense. Someday we should add namespace-aware tests to
unittests/Support/Path.
>>> + ?// Then compare against the list of ancient reserved names
>>> + ?for (size_t i = 0; i < sizeof(sReservedNames) / sizeof(const char *); ++i) {
>>> + ? ?if (path.equals_lower(sReservedNames[i]))
>>> + ? ? ?return true;
>>> + ?}
>>
>> Nitpick: Shall we handle "x:\path\to\com9.txt" here?
>
> I could certainly add that. ?Do we link against shlwapi.lib (available
> in Win2k and higher) so that I can use PathFindFileName? ?Or should I
> prefer our filename function from PathV2.cpp (this one only worries me
> in case we accidentally run into infinite loops at some point)?
I think it would be enough to use PathV2 itself to parse path. Using
shell api might be overkill (and useless).
Note: "x:\path\to\com9.txt" is mapped to the device namespace.
Why NTOS does not provide us namespace mapping API? :/
...Takumi
From geek4civic at gmail.com Mon Aug 22 22:45:22 2011
From: geek4civic at gmail.com (NAKAMURA Takumi)
Date: Tue, 23 Aug 2011 12:45:22 +0900
Subject: [llvm-commits] [llvm] r138198 -
/llvm/trunk/lib/Support/Windows/Windows.h
In-Reply-To:
References: <20110820063531.4DE432A6C12C@llvm.org>
Message-ID:
Anton,
>> URL: http://llvm.org/viewvc/llvm-project?rev=138198&view=rev
>> Log:
>> lib/Support/Windows/Windows.h: Require at least Windows XP(5.1) API. We will not support Windows 2000 any more.
> Will you please add a note to the docs?
Added stub to ReleaseNotes in r138297. Thanks to point it out.
...Takumi
From geek4civic at gmail.com Mon Aug 22 22:49:11 2011
From: geek4civic at gmail.com (NAKAMURA Takumi)
Date: Tue, 23 Aug 2011 03:49:11 -0000
Subject: [llvm-commits] [llvm] r138319 -
/llvm/trunk/lib/Support/Windows/Windows.h
Message-ID: <20110823034911.743102A6C12C@llvm.org>
Author: chapuni
Date: Mon Aug 22 22:49:11 2011
New Revision: 138319
URL: http://llvm.org/viewvc/llvm-project?rev=138319&view=rev
Log:
lib/Support/Windows/Windows.h: Update required IE ver. 0x0600 should be enough for Windows XP.
Modified:
llvm/trunk/lib/Support/Windows/Windows.h
Modified: llvm/trunk/lib/Support/Windows/Windows.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Windows.h?rev=138319&r1=138318&r2=138319&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/Windows.h (original)
+++ llvm/trunk/lib/Support/Windows/Windows.h Mon Aug 22 22:49:11 2011
@@ -21,7 +21,7 @@
// Require at least Windows XP(5.1) API.
#define _WIN32_WINNT 0x0501
-#define _WIN32_IE 0x0500 // MinGW at it again.
+#define _WIN32_IE 0x0600 // MinGW at it again.
#define WIN32_LEAN_AND_MEAN
#include "llvm/Config/config.h" // Get build system configuration settings
From geek4civic at gmail.com Mon Aug 22 22:53:40 2011
From: geek4civic at gmail.com (NAKAMURA Takumi)
Date: Tue, 23 Aug 2011 12:53:40 +0900
Subject: [llvm-commits] [PATCH] Updating the IE version specified in
Windows.h
In-Reply-To:
References:
Message-ID:
2011/8/22 Aaron Ballman :
> Since we switched over to using Windows XP as the base version of
> Windows we support, I've updated the IE version constant as well. ?IE6
> shipped with XP, but we were still specifying IE5.
>
> (You can verify this easily by looking at sdkddkver.h, there's a
> section for IE <-> OS which defines the usual mappings.)
Thanks. Updated in r138319.
(Yeah, I forgot the past, ... which version of IE, Windows XP had...)
I don't know, for now, what 0x0600 would provide us. :p
...Takumi
From krasin at chromium.org Mon Aug 22 23:36:02 2011
From: krasin at chromium.org (Ivan Krasin)
Date: Mon, 22 Aug 2011 21:36:02 -0700
Subject: [llvm-commits] [PATCH]Update config.sub, config.guess,
regenerate configure
Message-ID:
Hi llvm team,
this is the second update to config.sub, config.guess and configure.
The motivation to do that:
1. Now, llvm would use the stock config.sub. Before that we had an
uncommitted FreeBSD-related patch. Now, it has been upstreamed and
comes back. It means that it would be easier to update these files in
the next time (less magic knowledge)
2. Fix a typo for pseudo-CPUs: 32e[lb] -> [lb]e32, 64e[lb]->[lb]64.
One of these CPUs is used for PNaCl and it was not really convenient
to have a CPU that starts with a digit.
Please, let me know if it's fine to commit.
Thanks,
Ivan Krasin
From krasin at chromium.org Mon Aug 22 23:36:49 2011
From: krasin at chromium.org (Ivan Krasin)
Date: Mon, 22 Aug 2011 21:36:49 -0700
Subject: [llvm-commits] [PATCH]Update config.sub, config.guess,
regenerate configure
In-Reply-To:
References:
Message-ID:
As usuall, I've forgot to attach the patch. Please, find it here...
On Mon, Aug 22, 2011 at 9:36 PM, Ivan Krasin wrote:
> Hi llvm team,
>
> this is the second update to config.sub, config.guess and configure.
> The motivation to do that:
>
> 1. Now, llvm would use the stock config.sub. Before that we had an
> uncommitted FreeBSD-related patch. Now, it has been upstreamed and
> comes back. It means that it would be easier to update these files in
> the next time (less magic knowledge)
>
> 2. Fix a typo for pseudo-CPUs: 32e[lb] -> [lb]e32, 64e[lb]->[lb]64.
> One of these CPUs is used for PNaCl and it was not really convenient
> to have a CPU that starts with a digit.
>
> Please, let me know if it's fine to commit.
>
> Thanks,
> Ivan Krasin
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config_sub_2011_Aug_22.patch
Type: text/x-patch
Size: 3351 bytes
Desc: not available
Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110822/a7a91f9a/attachment.bin
From craig.topper at gmail.com Mon Aug 22 23:36:33 2011
From: craig.topper at gmail.com (Craig Topper)
Date: Tue, 23 Aug 2011 04:36:33 -0000
Subject: [llvm-commits] [llvm] r138321 - in /llvm/trunk:
lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86InstrSSE.td
test/CodeGen/X86/avx-cmp.ll test/CodeGen/X86/avx-splat.ll
Message-ID: <20110823043634.25E9A2A6C12C@llvm.org>
Author: ctopper
Date: Mon Aug 22 23:36:33 2011
New Revision: 138321
URL: http://llvm.org/viewvc/llvm-project?rev=138321&view=rev
Log:
Add support for breaking 256-bit v16i16 and v32i8 VSETCC into two 128-bit ones, avoiding sclarization. Add vex form of pcmpeqq and pcmpgtq. Fixes more cases for PR10712.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
llvm/trunk/lib/Target/X86/X86InstrSSE.td
llvm/trunk/test/CodeGen/X86/avx-cmp.ll
llvm/trunk/test/CodeGen/X86/avx-splat.ll
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=138321&r1=138320&r2=138321&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Aug 22 23:36:33 2011
@@ -989,6 +989,8 @@
setOperationAction(ISD::SRA, MVT::v8i32, Custom);
setOperationAction(ISD::SRA, MVT::v16i16, Custom);
+ setOperationAction(ISD::VSETCC, MVT::v32i8, Custom);
+ setOperationAction(ISD::VSETCC, MVT::v16i16, Custom);
setOperationAction(ISD::VSETCC, MVT::v8i32, Custom);
setOperationAction(ISD::VSETCC, MVT::v4i64, Custom);
Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=138321&r1=138320&r2=138321&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Mon Aug 22 23:36:33 2011
@@ -4889,6 +4889,11 @@
0>, VEX_4V;
defm VPMULDQ : SS41I_binop_rm_int<0x28, "vpmuldq", int_x86_sse41_pmuldq,
0>, VEX_4V;
+
+ def : Pat<(v2i64 (X86pcmpeqq VR128:$src1, VR128:$src2)),
+ (VPCMPEQQrr VR128:$src1, VR128:$src2)>;
+ def : Pat<(v2i64 (X86pcmpeqq VR128:$src1, (memop addr:$src2))),
+ (VPCMPEQQrm VR128:$src1, addr:$src2)>;
}
let Constraints = "$src1 = $dst" in {
@@ -5099,9 +5104,16 @@
(bitconvert (memopv16i8 addr:$src2))))]>, OpSize;
}
-let Predicates = [HasAVX] in
+let Predicates = [HasAVX] in {
defm VPCMPGTQ : SS42I_binop_rm_int<0x37, "vpcmpgtq", int_x86_sse42_pcmpgtq,
0>, VEX_4V;
+
+ def : Pat<(v2i64 (X86pcmpgtq VR128:$src1, VR128:$src2)),
+ (VPCMPGTQrr VR128:$src1, VR128:$src2)>;
+ def : Pat<(v2i64 (X86pcmpgtq VR128:$src1, (memop addr:$src2))),
+ (VPCMPGTQrm VR128:$src1, addr:$src2)>;
+}
+
let Constraints = "$src1 = $dst" in
defm PCMPGTQ : SS42I_binop_rm_int<0x37, "pcmpgtq", int_x86_sse42_pcmpgtq>;
@@ -5660,6 +5672,11 @@
def : Pat<(v2f64 (extract_subvector (v4f64 VR256:$src), (i32 0))),
(v2f64 (EXTRACT_SUBREG (v4f64 VR256:$src), sub_xmm))>;
+def : Pat<(v8i16 (extract_subvector (v16i16 VR256:$src), (i32 0))),
+ (v8i16 (EXTRACT_SUBREG (v16i16 VR256:$src), sub_xmm))>;
+def : Pat<(v16i8 (extract_subvector (v32i8 VR256:$src), (i32 0))),
+ (v16i8 (EXTRACT_SUBREG (v32i8 VR256:$src), sub_xmm))>;
+
//===----------------------------------------------------------------------===//
// VMASKMOV - Conditional SIMD Packed Loads and Stores
Modified: llvm/trunk/test/CodeGen/X86/avx-cmp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx-cmp.ll?rev=138321&r1=138320&r2=138321&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/avx-cmp.ll (original)
+++ llvm/trunk/test/CodeGen/X86/avx-cmp.ll Mon Aug 22 23:36:33 2011
@@ -53,3 +53,80 @@
ret <8 x i32> %x
}
+; CHECK: vextractf128 $1
+; CHECK: vextractf128 $1
+; CHECK-NEXT: vpcmpgtq %xmm
+; CHECK-NEXT: vpcmpgtq %xmm
+; CHECK-NEXT: vinsertf128 $1
+define <4 x i64> @v4i64-cmp(<4 x i64> %i, <4 x i64> %j) nounwind readnone {
+ %bincmp = icmp slt <4 x i64> %i, %j
+ %x = sext <4 x i1> %bincmp to <4 x i64>
+ ret <4 x i64> %x
+}
+
+; CHECK: vextractf128 $1
+; CHECK: vextractf128 $1
+; CHECK-NEXT: vpcmpgtw %xmm
+; CHECK-NEXT: vpcmpgtw %xmm
+; CHECK-NEXT: vinsertf128 $1
+define <16 x i16> @v16i16-cmp(<16 x i16> %i, <16 x i16> %j) nounwind readnone {
+ %bincmp = icmp slt <16 x i16> %i, %j
+ %x = sext <16 x i1> %bincmp to <16 x i16>
+ ret <16 x i16> %x
+}
+
+; CHECK: vextractf128 $1
+; CHECK: vextractf128 $1
+; CHECK-NEXT: vpcmpgtb %xmm
+; CHECK-NEXT: vpcmpgtb %xmm
+; CHECK-NEXT: vinsertf128 $1
+define <32 x i8> @v32i8-cmp(<32 x i8> %i, <32 x i8> %j) nounwind readnone {
+ %bincmp = icmp slt <32 x i8> %i, %j
+ %x = sext <32 x i1> %bincmp to <32 x i8>
+ ret <32 x i8> %x
+}
+
+; CHECK: vextractf128 $1
+; CHECK: vextractf128 $1
+; CHECK-NEXT: vpcmpeqd %xmm
+; CHECK-NEXT: vpcmpeqd %xmm
+; CHECK-NEXT: vinsertf128 $1
+define <8 x i32> @int256-cmpeq(<8 x i32> %i, <8 x i32> %j) nounwind readnone {
+ %bincmp = icmp eq <8 x i32> %i, %j
+ %x = sext <8 x i1> %bincmp to <8 x i32>
+ ret <8 x i32> %x
+}
+
+; CHECK: vextractf128 $1
+; CHECK: vextractf128 $1
+; CHECK-NEXT: vpcmpeqq %xmm
+; CHECK-NEXT: vpcmpeqq %xmm
+; CHECK-NEXT: vinsertf128 $1
+define <4 x i64> @v4i64-cmpeq(<4 x i64> %i, <4 x i64> %j) nounwind readnone {
+ %bincmp = icmp eq <4 x i64> %i, %j
+ %x = sext <4 x i1> %bincmp to <4 x i64>
+ ret <4 x i64> %x
+}
+
+; CHECK: vextractf128 $1
+; CHECK: vextractf128 $1
+; CHECK-NEXT: vpcmpeqw %xmm
+; CHECK-NEXT: vpcmpeqw %xmm
+; CHECK-NEXT: vinsertf128 $1
+define <16 x i16> @v16i16-cmpeq(<16 x i16> %i, <16 x i16> %j) nounwind readnone {
+ %bincmp = icmp eq <16 x i16> %i, %j
+ %x = sext <16 x i1> %bincmp to <16 x i16>
+ ret <16 x i16> %x
+}
+
+; CHECK: vextractf128 $1
+; CHECK: vextractf128 $1
+; CHECK-NEXT: vpcmpeqb %xmm
+; CHECK-NEXT: vpcmpeqb %xmm
+; CHECK-NEXT: vinsertf128 $1
+define <32 x i8> @v32i8-cmpeq(<32 x i8> %i, <32 x i8> %j) nounwind readnone {
+ %bincmp = icmp eq <32 x i8> %i, %j
+ %x = sext <32 x i1> %bincmp to <32 x i8>
+ ret <32 x i8> %x
+}
+
Modified: llvm/trunk/test/CodeGen/X86/avx-splat.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx-splat.ll?rev=138321&r1=138320&r2=138321&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/avx-splat.ll (original)
+++ llvm/trunk/test/CodeGen/X86/avx-splat.ll Mon Aug 22 23:36:33 2011
@@ -1,10 +1,8 @@
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s
-; FIXME: use avx versions for punpcklbw, punpckhbw and punpckhwd
-; CHECK: vextractf128 $0
-; CHECK-NEXT: punpcklbw
-; CHECK-NEXT: punpckhbw
+; CHECK: vpunpcklbw %xmm
+; CHECK-NEXT: vpunpckhbw %xmm
; CHECK-NEXT: vinsertf128 $1
; CHECK-NEXT: vpermilps $85
define <32 x i8> @funcA(<32 x i8> %a) nounwind uwtable readnone ssp {
@@ -13,8 +11,7 @@
ret <32 x i8> %shuffle
}
-; CHECK: vextractf128 $0
-; CHECK-NEXT: punpckhwd
+; CHECK: vpunpckhwd %xmm
; CHECK-NEXT: vinsertf128 $1
; CHECK-NEXT: vpermilps $85
define <16 x i16> @funcB(<16 x i16> %a) nounwind uwtable readnone ssp {
From bruno.cardoso at gmail.com Tue Aug 23 00:59:40 2011
From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes)
Date: Mon, 22 Aug 2011 22:59:40 -0700
Subject: [llvm-commits] [llvm] r138321 - in /llvm/trunk:
lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86InstrSSE.td
test/CodeGen/X86/avx-cmp.ll test/CodeGen/X86/avx-splat.ll
In-Reply-To: <20110823043634.25E9A2A6C12C@llvm.org>
References: <20110823043634.25E9A2A6C12C@llvm.org>
Message-ID:
Thanks Craig!
On Mon, Aug 22, 2011 at 9:36 PM, Craig Topper wrote:
> Author: ctopper
> Date: Mon Aug 22 23:36:33 2011
> New Revision: 138321
>
> URL: http://llvm.org/viewvc/llvm-project?rev=138321&view=rev
> Log:
> Add support for breaking 256-bit v16i16 and v32i8 VSETCC into two 128-bit ones, avoiding sclarization. Add vex form of pcmpeqq and pcmpgtq. Fixes more cases for PR10712.
>
> Modified:
> ? ?llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
> ? ?llvm/trunk/lib/Target/X86/X86InstrSSE.td
> ? ?llvm/trunk/test/CodeGen/X86/avx-cmp.ll
> ? ?llvm/trunk/test/CodeGen/X86/avx-splat.ll
>
> Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=138321&r1=138320&r2=138321&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Aug 22 23:36:33 2011
> @@ -989,6 +989,8 @@
> ? ? setOperationAction(ISD::SRA, ? ? ? ? ? ? ? MVT::v8i32, Custom);
> ? ? setOperationAction(ISD::SRA, ? ? ? ? ? ? ? MVT::v16i16, Custom);
>
> + ? ?setOperationAction(ISD::VSETCC, ? ? ? ? ? ?MVT::v32i8, Custom);
> + ? ?setOperationAction(ISD::VSETCC, ? ? ? ? ? ?MVT::v16i16, Custom);
> ? ? setOperationAction(ISD::VSETCC, ? ? ? ? ? ?MVT::v8i32, Custom);
> ? ? setOperationAction(ISD::VSETCC, ? ? ? ? ? ?MVT::v4i64, Custom);
>
>
> Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=138321&r1=138320&r2=138321&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original)
> +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Mon Aug 22 23:36:33 2011
> @@ -4889,6 +4889,11 @@
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?0>, VEX_4V;
> ? defm VPMULDQ ? : SS41I_binop_rm_int<0x28, "vpmuldq", ? int_x86_sse41_pmuldq,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?0>, VEX_4V;
> +
> + ?def : Pat<(v2i64 (X86pcmpeqq VR128:$src1, VR128:$src2)),
> + ? ? ? ? ? ?(VPCMPEQQrr VR128:$src1, VR128:$src2)>;
> + ?def : Pat<(v2i64 (X86pcmpeqq VR128:$src1, (memop addr:$src2))),
> + ? ? ? ? ? ?(VPCMPEQQrm VR128:$src1, addr:$src2)>;
> ?}
>
> ?let Constraints = "$src1 = $dst" in {
> @@ -5099,9 +5104,16 @@
> ? ? ? ? ? (bitconvert (memopv16i8 addr:$src2))))]>, OpSize;
> ?}
>
> -let Predicates = [HasAVX] in
> +let Predicates = [HasAVX] in {
> ? defm VPCMPGTQ : SS42I_binop_rm_int<0x37, "vpcmpgtq", int_x86_sse42_pcmpgtq,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?0>, VEX_4V;
> +
> + ?def : Pat<(v2i64 (X86pcmpgtq VR128:$src1, VR128:$src2)),
> + ? ? ? ? ? ?(VPCMPGTQrr VR128:$src1, VR128:$src2)>;
> + ?def : Pat<(v2i64 (X86pcmpgtq VR128:$src1, (memop addr:$src2))),
> + ? ? ? ? ? ?(VPCMPGTQrm VR128:$src1, addr:$src2)>;
> +}
> +
> ?let Constraints = "$src1 = $dst" in
> ? defm PCMPGTQ : SS42I_binop_rm_int<0x37, "pcmpgtq", int_x86_sse42_pcmpgtq>;
>
> @@ -5660,6 +5672,11 @@
> ?def : Pat<(v2f64 (extract_subvector (v4f64 VR256:$src), (i32 0))),
> ? ? ? ? ? (v2f64 (EXTRACT_SUBREG (v4f64 VR256:$src), sub_xmm))>;
>
> +def : Pat<(v8i16 (extract_subvector (v16i16 VR256:$src), (i32 0))),
> + ? ? ? ? ?(v8i16 (EXTRACT_SUBREG (v16i16 VR256:$src), sub_xmm))>;
> +def : Pat<(v16i8 (extract_subvector (v32i8 VR256:$src), (i32 0))),
> + ? ? ? ? ?(v16i8 (EXTRACT_SUBREG (v32i8 VR256:$src), sub_xmm))>;
> +
>
> ?//===----------------------------------------------------------------------===//
> ?// VMASKMOV - Conditional SIMD Packed Loads and Stores
>
> Modified: llvm/trunk/test/CodeGen/X86/avx-cmp.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx-cmp.ll?rev=138321&r1=138320&r2=138321&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/X86/avx-cmp.ll (original)
> +++ llvm/trunk/test/CodeGen/X86/avx-cmp.ll Mon Aug 22 23:36:33 2011
> @@ -53,3 +53,80 @@
> ? ret <8 x i32> %x
> ?}
>
> +; CHECK: vextractf128 ?$1
> +; CHECK: vextractf128 ?$1
> +; CHECK-NEXT: vpcmpgtq ?%xmm
> +; CHECK-NEXT: vpcmpgtq ?%xmm
> +; CHECK-NEXT: vinsertf128 $1
> +define <4 x i64> @v4i64-cmp(<4 x i64> %i, <4 x i64> %j) nounwind readnone {
> + ?%bincmp = icmp slt <4 x i64> %i, %j
> + ?%x = sext <4 x i1> %bincmp to <4 x i64>
> + ?ret <4 x i64> %x
> +}
> +
> +; CHECK: vextractf128 ?$1
> +; CHECK: vextractf128 ?$1
> +; CHECK-NEXT: vpcmpgtw ?%xmm
> +; CHECK-NEXT: vpcmpgtw ?%xmm
> +; CHECK-NEXT: vinsertf128 $1
> +define <16 x i16> @v16i16-cmp(<16 x i16> %i, <16 x i16> %j) nounwind readnone {
> + ?%bincmp = icmp slt <16 x i16> %i, %j
> + ?%x = sext <16 x i1> %bincmp to <16 x i16>
> + ?ret <16 x i16> %x
> +}
> +
> +; CHECK: vextractf128 ?$1
> +; CHECK: vextractf128 ?$1
> +; CHECK-NEXT: vpcmpgtb ?%xmm
> +; CHECK-NEXT: vpcmpgtb ?%xmm
> +; CHECK-NEXT: vinsertf128 $1
> +define <32 x i8> @v32i8-cmp(<32 x i8> %i, <32 x i8> %j) nounwind readnone {
> + ?%bincmp = icmp slt <32 x i8> %i, %j
> + ?%x = sext <32 x i1> %bincmp to <32 x i8>
> + ?ret <32 x i8> %x
> +}
> +
> +; CHECK: vextractf128 ?$1
> +; CHECK: vextractf128 ?$1
> +; CHECK-NEXT: vpcmpeqd ?%xmm
> +; CHECK-NEXT: vpcmpeqd ?%xmm
> +; CHECK-NEXT: vinsertf128 $1
> +define <8 x i32> @int256-cmpeq(<8 x i32> %i, <8 x i32> %j) nounwind readnone {
> + ?%bincmp = icmp eq <8 x i32> %i, %j
> + ?%x = sext <8 x i1> %bincmp to <8 x i32>
> + ?ret <8 x i32> %x
> +}
> +
> +; CHECK: vextractf128 ?$1
> +; CHECK: vextractf128 ?$1
> +; CHECK-NEXT: vpcmpeqq ?%xmm
> +; CHECK-NEXT: vpcmpeqq ?%xmm
> +; CHECK-NEXT: vinsertf128 $1
> +define <4 x i64> @v4i64-cmpeq(<4 x i64> %i, <4 x i64> %j) nounwind readnone {
> + ?%bincmp = icmp eq <4 x i64> %i, %j
> + ?%x = sext <4 x i1> %bincmp to <4 x i64>
> + ?ret <4 x i64> %x
> +}
> +
> +; CHECK: vextractf128 ?$1
> +; CHECK: vextractf128 ?$1
> +; CHECK-NEXT: vpcmpeqw ?%xmm
> +; CHECK-NEXT: vpcmpeqw ?%xmm
> +; CHECK-NEXT: vinsertf128 $1
> +define <16 x i16> @v16i16-cmpeq(<16 x i16> %i, <16 x i16> %j) nounwind readnone {
> + ?%bincmp = icmp eq <16 x i16> %i, %j
> + ?%x = sext <16 x i1> %bincmp to <16 x i16>
> + ?ret <16 x i16> %x
> +}
> +
> +; CHECK: vextractf128 ?$1
> +; CHECK: vextractf128 ?$1
> +; CHECK-NEXT: vpcmpeqb ?%xmm
> +; CHECK-NEXT: vpcmpeqb ?%xmm
> +; CHECK-NEXT: vinsertf128 $1
> +define <32 x i8> @v32i8-cmpeq(<32 x i8> %i, <32 x i8> %j) nounwind readnone {
> + ?%bincmp = icmp eq <32 x i8> %i, %j
> + ?%x = sext <32 x i1> %bincmp to <32 x i8>
> + ?ret <32 x i8> %x
> +}
> +
>
> Modified: llvm/trunk/test/CodeGen/X86/avx-splat.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx-splat.ll?rev=138321&r1=138320&r2=138321&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/X86/avx-splat.ll (original)
> +++ llvm/trunk/test/CodeGen/X86/avx-splat.ll Mon Aug 22 23:36:33 2011
> @@ -1,10 +1,8 @@
> ?; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s
>
> -; FIXME: use avx versions for punpcklbw, punpckhbw and punpckhwd
>
> -; CHECK: vextractf128 $0
> -; CHECK-NEXT: punpcklbw
> -; CHECK-NEXT: punpckhbw
> +; CHECK: vpunpcklbw %xmm
> +; CHECK-NEXT: vpunpckhbw %xmm
> ?; CHECK-NEXT: vinsertf128 $1
> ?; CHECK-NEXT: vpermilps $85
> ?define <32 x i8> @funcA(<32 x i8> %a) nounwind uwtable readnone ssp {
> @@ -13,8 +11,7 @@
> ? ret <32 x i8> %shuffle
> ?}
>
> -; CHECK: vextractf128 $0
> -; CHECK-NEXT: punpckhwd
> +; CHECK: vpunpckhwd %xmm
> ?; CHECK-NEXT: vinsertf128 $1
> ?; CHECK-NEXT: vpermilps $85
> ?define <16 x i16> @funcB(<16 x i16> %a) nounwind uwtable readnone ssp {
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
--
Bruno Cardoso Lopes
http://www.brunocardoso.cc
From zwarich at apple.com Tue Aug 23 01:20:41 2011
From: zwarich at apple.com (Cameron Zwarich)
Date: Tue, 23 Aug 2011 06:20:41 -0000
Subject: [llvm-commits] [test-suite] r138322 -
/test-suite/trunk/External/SPEC/CINT2000/Makefile
Message-ID: <20110823062041.747982A6C12C@llvm.org>
Author: zwarich
Date: Tue Aug 23 01:20:41 2011
New Revision: 138322
URL: http://llvm.org/viewvc/llvm-project?rev=138322&view=rev
Log:
176.gcc was disabled with Clang for a use of lvalue casts, but it is easy to
patch yourself or get updated source from SPEC. I updated the Apple copy.
Modified:
test-suite/trunk/External/SPEC/CINT2000/Makefile
Modified: test-suite/trunk/External/SPEC/CINT2000/Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT2000/Makefile?rev=138322&r1=138321&r2=138322&view=diff
==============================================================================
--- test-suite/trunk/External/SPEC/CINT2000/Makefile (original)
+++ test-suite/trunk/External/SPEC/CINT2000/Makefile Tue Aug 23 01:20:41 2011
@@ -13,11 +13,6 @@
256.bzip2 \
300.twolf
-# Disable 176.gcc when testing with Clang, which doesn't support lvalue casts.
-ifdef CC_UNDER_TEST_IS_CLANG
-PARALLEL_DIRS := $(filter-out 176.gcc, $(PARALLEL_DIRS))
-endif
-
# Get the $(ARCH) setting
include $(LEVEL)/Makefile.config
From echristo at apple.com Tue Aug 23 01:40:12 2011
From: echristo at apple.com (Eric Christopher)
Date: Mon, 22 Aug 2011 23:40:12 -0700
Subject: [llvm-commits] [PATCH]Update config.sub, config.guess,
regenerate configure
In-Reply-To:
References:
Message-ID: <85C9C6AB-FD6D-4C44-B458-58F361AD49F7@apple.com>
On Aug 22, 2011, at 9:36 PM, Ivan Krasin wrote:
>
OK.
-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110822/8bc6efcb/attachment.html
From krasin at chromium.org Tue Aug 23 01:43:49 2011
From: krasin at chromium.org (Ivan Krasin)
Date: Tue, 23 Aug 2011 06:43:49 -0000
Subject: [llvm-commits] [llvm] r138323 - in /llvm/trunk:
autoconf/config.guess autoconf/config.sub configure
Message-ID: <20110823064349.C540F2A6C12C@llvm.org>
Author: krasin
Date: Tue Aug 23 01:43:49 2011
New Revision: 138323
URL: http://llvm.org/viewvc/llvm-project?rev=138323&view=rev
Log:
Update config.sub, config.guess and configure.
The motivation to do that:
1. Now, llvm would use the stock config.sub. Before that we had an
uncommitted FreeBSD-related patch. Now, it has been upstreamed and
comes back. It means that it would be easier to update these files in
the next time (less magic knowledge)
2. Fix a typo for pseudo-CPUs: 32e[lb] -> [lb]e32, 64e[lb]->[lb]64.
One of these CPUs is used for PNaCl and it was not really convenient
to have a CPU that starts with a digit.
Modified:
llvm/trunk/autoconf/config.guess
llvm/trunk/autoconf/config.sub
llvm/trunk/configure
Modified: llvm/trunk/autoconf/config.guess
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/config.guess?rev=138323&r1=138322&r2=138323&view=diff
==============================================================================
--- llvm/trunk/autoconf/config.guess (original)
+++ llvm/trunk/autoconf/config.guess Tue Aug 23 01:43:49 2011
@@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011 Free Software Foundation, Inc.
-timestamp='2011-08-17'
+timestamp='2011-08-20'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -793,7 +793,7 @@
exit ;;
*:FreeBSD:*:*)
UNAME_PROCESSOR=`/usr/bin/uname -p`
- case ${UNAME_MACHINE} in
+ case ${UNAME_PROCESSOR} in
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
Modified: llvm/trunk/autoconf/config.sub
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/config.sub?rev=138323&r1=138322&r2=138323&view=diff
==============================================================================
--- llvm/trunk/autoconf/config.sub (original)
+++ llvm/trunk/autoconf/config.sub Tue Aug 23 01:43:49 2011
@@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011 Free Software Foundation, Inc.
-timestamp='2011-08-15'
+timestamp='2011-08-23'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -246,12 +246,12 @@
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
1750a | 580 \
- | 32e[bl] | 64e[bl] \
| a29k \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | be32 | be64 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
@@ -259,6 +259,7 @@
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
+ | le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep | metag \
@@ -352,13 +353,13 @@
;;
# Recognize the basic CPU types with company name.
580-* \
- | 32e[bl]-* | 64e[bl]-* \
| a29k-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
+ | be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| clipper-* | craynv-* | cydra-* \
@@ -369,6 +370,7 @@
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
+ | le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
@@ -816,7 +818,7 @@
os=-mvs
;;
nacl)
- basic_machine=32el-unknown
+ basic_machine=le32-unknown
os=-nacl
;;
ncr3000)
Modified: llvm/trunk/configure
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=138323&r1=138322&r2=138323&view=diff
==============================================================================
--- llvm/trunk/configure (original)
+++ llvm/trunk/configure Tue Aug 23 01:43:49 2011
@@ -11614,7 +11614,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <
This avoids costly scalarization. Unfortunately, there is no 128-bit
byte multiply operation in X86 so I didn't break up MUL of v32i8.
Fixes PR10711.
--
~Craig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: op_lowering.patch
Type: application/octet-stream
Size: 8671 bytes
Desc: not available
Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110822/1034d5f7/attachment.obj
From krasin at google.com Tue Aug 23 01:59:11 2011
From: krasin at google.com (Ivan Krasin)
Date: Mon, 22 Aug 2011 23:59:11 -0700
Subject: [llvm-commits] [PATCH]Update config.sub, config.guess,
regenerate configure
In-Reply-To: <85C9C6AB-FD6D-4C44-B458-58F361AD49F7@apple.com>
References:
<85C9C6AB-FD6D-4C44-B458-58F361AD49F7@apple.com>
Message-ID:
Thanks. r138323.
On Mon, Aug 22, 2011 at 11:40 PM, Eric Christopher wrote:
>
> On Aug 22, 2011, at 9:36 PM, Ivan Krasin wrote:
>
>
>
> OK.
> -eric
From nadav.rotem at intel.com Tue Aug 23 02:03:04 2011
From: nadav.rotem at intel.com (Rotem, Nadav)
Date: Tue, 23 Aug 2011 10:03:04 +0300
Subject: [llvm-commits] [PATCH] Break 256-bit vector int add/sub/mul
into two 128-bit operations
In-Reply-To:
References:
Message-ID: <6594DDFF12B03D4E89690887C2486994029705F0F3@hasmsx504.ger.corp.intel.com>
LGTM.
-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Craig Topper
Sent: Tuesday, August 23, 2011 09:48
To: llvm-commits at cs.uiuc.edu; bruno.cardoso at gmail.com
Subject: [llvm-commits] [PATCH] Break 256-bit vector int add/sub/mul into two 128-bit operations
This avoids costly scalarization. Unfortunately, there is no 128-bit byte multiply operation in X86 so I didn't break up MUL of v32i8.
Fixes PR10711.
--
~Craig
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
From bruno.cardoso at gmail.com Tue Aug 23 02:12:18 2011
From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes)
Date: Tue, 23 Aug 2011 00:12:18 -0700
Subject: [llvm-commits] [PATCH] Break 256-bit vector int add/sub/mul
into two 128-bit operations
In-Reply-To:
References:
Message-ID:
Hi Craig,
Look great, just some minor stuff:
1) Place some asserts into LowerADD and LowerSUB before calling Lower256IntOp.
2) Remove the ISD::MUL,ADD,SUB assert from Lower256IntOp.
3) Rename Lower256IntOp to Lower256IntArith
After fixing this please commit!
On Mon, Aug 22, 2011 at 11:48 PM, Craig Topper wrote:
> This avoids costly scalarization. Unfortunately, there is no 128-bit
> byte multiply operation in X86 so I didn't break up MUL of v32i8.
> Fixes PR10711.
>
> --
> ~Craig
>
--
Bruno Cardoso Lopes
http://www.brunocardoso.cc
From krasin at chromium.org Tue Aug 23 02:15:55 2011
From: krasin at chromium.org (Ivan Krasin)
Date: Tue, 23 Aug 2011 00:15:55 -0700
Subject: [llvm-commits] Add le32 arch support into Triple
Message-ID:
Hi llvm team!
This patch adds support of le32 pseudo-cpu that stands for generic
32-bit little-endian CPU.
PNaCl would use le32-unknown-nacl triple for generating
platform-independent pexe (llvm bitcode based),
x86_64-unknown-nacl, i686-unknown-nacl and armv7-unknown-nacl for the
target-specific NaCl binaries (which would be translated from pexe).
The next patch will add a clang target that would be able to generate
PNaCl-compatible object files (and, it's expected that after that I
will upstream the changes which would allow to get the full pexe
programs from clang)
Please, let me know if it's fine to commit this patch.
Thanks in advance,
Ivan Krasin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add_le32_cpu.patch
Type: text/x-patch
Size: 1382 bytes
Desc: not available
Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20110823/c95bde52/attachment.bin
From geek4civic at gmail.com Tue Aug 23 05:34:51 2011
From: geek4civic at gmail.com (NAKAMURA Takumi)
Date: Tue, 23 Aug 2011 19:34:51 +0900
Subject: [llvm-commits] [PATCH] Improved threading support on Windows
In-Reply-To:
References:
Message-ID:
Good evening, Aaron!
About lib/Support/Windows/RWMutex.inc;
- Would you like to try describing rwmutex on windows xp?
Oh yeah, I don't have any Windows XP hosts any more. :(
- I think, rather to refer to kernel32.dll, GetModuleHandle(NULL)
would be more enough.
How do you think?
- It would be happier for us to have generic "delayed dll resolver"
for NT5.1-unavailable entries.
I think it might be the global ctor. How do you think?
- How about to split RWMutexImpl to Windows XP and higher?
- Could you consider unittests for rwmutex?
Thanks to work on this!
...Takumi
From geek4civic at gmail.com Tue Aug 23 05:58:08 2011
From: geek4civic at gmail.com (NAKAMURA Takumi)
Date: Tue, 23 Aug 2011 19:58:08 +0900
Subject: [llvm-commits] [PATCH] Improved threading support on Windows
In-Reply-To:
References:
Message-ID:
Aaron, about Threading.diff,
+ (void)::WaitForSingleObject(param.evt, INFINITE);
I guess thread object might be the signal object. You may wait for hThread.
...Takumi
From grosser at fim.uni-passau.de Tue Aug 23 07:31:14 2011
From: grosser at fim.uni-passau.de (Tobias Grosser)
Date: Tue, 23 Aug 2011 12:31:14 -0000
Subject: [llvm-commits] [polly] r138325 -
/polly/trunk/lib/ScheduleOptimizer.cpp
Message-ID: <20110823123114.6F2852A6C12C@llvm.org>
Author: grosser
Date: Tue Aug 23 07:31:14 2011
New Revision: 138325
URL: http://llvm.org/viewvc/llvm-project?rev=138325&view=rev
Log:
ScheduleOptimizer: Fix some memory errors.
This fixes reference counting if the schedule optimizer is used.
Modified:
polly/trunk/lib/ScheduleOptimizer.cpp
Modified: polly/trunk/lib/ScheduleOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/ScheduleOptimizer.cpp?rev=138325&r1=138324&r2=138325&view=diff
==============================================================================
--- polly/trunk/lib/ScheduleOptimizer.cpp (original)
+++ polly/trunk/lib/ScheduleOptimizer.cpp Tue Aug 23 07:31:14 2011
@@ -97,6 +97,7 @@
isl_map *changeScatteringMap = isl_map_from_basic_map(changeScattering);
stmt->setScattering(isl_map_apply_range(scattering, changeScatteringMap));
+ isl_dim_free(dim);
}
}
@@ -386,7 +387,8 @@
isl_union_set_from_set(domain));
isl_map *stmtSchedule;
isl_union_map_foreach_map(stmtBand, getSingleMap, &stmtSchedule);
- stmt->setScattering(stmtSchedule);
+ stmt->setScattering(isl_map_copy(stmtSchedule));
+ isl_union_map_free(stmtBand);
}
isl_union_map_free(tiledSchedule);
From grosser at fim.uni-passau.de Tue Aug 23 07:31:18 2011
From: grosser at fim.uni-passau.de (Tobias Grosser)
Date: Tue, 23 Aug 2011 12:31:18 -0000
Subject: [llvm-commits] [polly] r138326 - /polly/trunk/www/phonecall.html
Message-ID: <20110823123118.165F42A6C12D@llvm.org>
Author: grosser
Date: Tue Aug 23 07:31:17 2011
New Revision: 138326
URL: http://llvm.org/viewvc/llvm-project?rev=138326&view=rev
Log:
Add information about polyhedral phone call.
Added:
polly/trunk/www/phonecall.html
Added: polly/trunk/www/phonecall.html
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/www/phonecall.html?rev=138326&view=auto
==============================================================================
--- polly/trunk/www/phonecall.html (added)
+++ polly/trunk/www/phonecall.html Tue Aug 23 07:31:17 2011
@@ -0,0 +1,46 @@
+
+
+
+
+
+ Polly - Polyhedral Phone Call
+
+
+
+
+
+
+
+
Polly: Polyhedral Phone Call
+
+
+
There are irregular phone calls to discuss polyhedral topics and
+ related projects. For this we use a conference service that can be
+ reached both through SIP clients and international dial in numbers.
+
+
+
VoIP/SIP: sip:000777polyhedral at iptel.org
+ Ekiga is a SIP client that works well for
+ most of us.
+
Traditional Dailin Numbers:
+ To use your normal land line phone to connect to the conference dial
+ one of the many available dial in
+ numbers. When asked for the number to connect type: *011497659.
+
+ Attention: Some of the dial in numbers do not work reliable. If you are not
+ asked for the number you want to connect to after a couple of seconds, just
+ try another one.
+ Some selected dial in numbers:
+
+
USA: +1-443-524-7370, +1-702-553-2797
+
UK: +44-151-601-8747, +44-115-871-8347
+
Belgium: +32-4-2680133, +32-9-2980106
+
+
+
+
+
+
+
From criswell at uiuc.edu Tue Aug 23 09:47:13 2011
From: criswell at uiuc.edu (John Criswell)
Date: Tue, 23 Aug 2011 14:47:13 -0000
Subject: [llvm-commits] [poolalloc] r138328 -
/poolalloc/trunk/include/dsa/DSCallGraph.h
Message-ID: <20110823144713.A0BA92A6C12C@llvm.org>
Author: criswell
Date: Tue Aug 23 09:47:13 2011
New Revision: 138328
URL: http://llvm.org/viewvc/llvm-project?rev=138328&view=rev
Log:
Removed cryptic comment about include cassert.
Re-ordered includes to be as close to the LLVM convention as is currently
possible.
Modified:
poolalloc/trunk/include/dsa/DSCallGraph.h
Modified: poolalloc/trunk/include/dsa/DSCallGraph.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DSCallGraph.h?rev=138328&r1=138327&r2=138328&view=diff
==============================================================================
--- poolalloc/trunk/include/dsa/DSCallGraph.h (original)
+++ poolalloc/trunk/include/dsa/DSCallGraph.h Tue Aug 23 09:47:13 2011
@@ -16,13 +16,12 @@
#include "dsa/svset.h"
#include "dsa/keyiterator.h"
-#include