r265344 - Fix an unused-variable warning by using the variable in the place
John McCall via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 4 13:39:50 PDT 2016
Author: rjmccall
Date: Mon Apr 4 15:39:50 2016
New Revision: 265344
URL: http://llvm.org/viewvc/llvm-project?rev=265344&view=rev
Log:
Fix an unused-variable warning by using the variable in the place
it was supposed to have been used.
Modified:
cfe/trunk/lib/CodeGen/SwiftCallingConv.cpp
cfe/trunk/test/CodeGen/arm-swiftcall.c
Modified: cfe/trunk/lib/CodeGen/SwiftCallingConv.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/SwiftCallingConv.cpp?rev=265344&r1=265343&r2=265344&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/SwiftCallingConv.cpp (original)
+++ cfe/trunk/lib/CodeGen/SwiftCallingConv.cpp Mon Apr 4 15:39:50 2016
@@ -239,7 +239,7 @@ void SwiftAggLowering::addLegalTypedData
auto eltSize = (end - begin) / numElts;
assert(eltSize == getTypeStoreSize(CGM, eltTy));
for (size_t i = 0, e = numElts; i != e; ++i) {
- addLegalTypedData(type, begin, begin + eltSize);
+ addLegalTypedData(eltTy, begin, begin + eltSize);
begin += eltSize;
}
assert(begin == end);
Modified: cfe/trunk/test/CodeGen/arm-swiftcall.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/arm-swiftcall.c?rev=265344&r1=265343&r2=265344&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/arm-swiftcall.c (original)
+++ cfe/trunk/test/CodeGen/arm-swiftcall.c Mon Apr 4 15:39:50 2016
@@ -62,6 +62,7 @@ typedef float float4 __attribute__((ext_
typedef float float8 __attribute__((ext_vector_type(8)));
typedef double double2 __attribute__((ext_vector_type(2)));
typedef double double4 __attribute__((ext_vector_type(4)));
+typedef int int3 __attribute__((ext_vector_type(3)));
typedef int int4 __attribute__((ext_vector_type(4)));
typedef int int5 __attribute__((ext_vector_type(5)));
typedef int int8 __attribute__((ext_vector_type(8)));
@@ -494,3 +495,10 @@ TEST(int5)
// CHECK: [[SECOND:%.*]] = load i32, i32* [[T0]], align
// CHECK: call [[SWIFTCC]] void @take_int5(<4 x i32> [[FIRST]], i32 [[SECOND]])
// CHECK: ret void
+
+typedef struct {
+ int x;
+ int3 v __attribute__((packed));
+} misaligned_int3;
+TEST(misaligned_int3)
+// CHECK-LABEL: define {{.*}} @take_misaligned_int3(i32, i32, i32, i32)
More information about the cfe-commits
mailing list