<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>The test you added is failing, please fix soon or revert.</div><div><br></div><div><blockquote type="cite"><pre style="font-family: 'Courier New', courier, monotype; "><span class="stdout">******************** TEST 'Clang :: CodeGen/ppc64-struct-onefloat.c' FAILED ********************Script:
--
/Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin10-nobootstrap-RA/clang-build/Release+Asserts/bin/clang -cc1 -internal-isystem /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin10-nobootstrap-RA/clang-build/Release+Asserts/bin/../lib/clang/3.2/include -O0 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin10-nobootstrap-RA/clang.src/test/CodeGen/ppc64-struct-onefloat.c | FileCheck /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin10-nobootstrap-RA/clang.src/test/CodeGen/ppc64-struct-onefloat.c
--
Exit Code: 1
Command Output (stderr):
--
Assertion failed: (semantics.arithmeticOK && "Compile-time arithmetic does not support these semantics"), function assertArithmeticOK, file /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin10-nobootstrap-RA/llvm/lib/Support/APFloat.cpp, line 122.
0  clang             0x00000001016c1d62 PrintStackTrace(void*) + 34
1  clang             0x00000001016c2244 SignalHandler(int) + 644
2  libSystem.B.dylib 0x00007fff853921ba _sigtramp + 26
3  libSystem.B.dylib 0x6c4650412f74726f _sigtramp + 2856014031
4  clang             0x00000001016c1fa6 abort + 22
5  clang             0x00000001016c1f81 __assert_rtn + 81
6  clang             0x000000010168301b llvm::APFloat::APFloat(llvm::fltSemantics const&) + 123
7  clang             0x00000001004692ff BuildFloatingLiteral(clang::Sema&, clang::NumericLiteralParser&, clang::QualType, clang::SourceLocation) + 79
8  clang             0x0000000100468598 clang::Sema::ActOnNumericConstant(clang::Token const&, clang::Scope*) + 1800
9  clang             0x00000001002dd0a0 clang::Parser::ParseCastExpression(bool, bool, bool&, clang::Parser::TypeCastState) + 496
10 clang             0x00000001002ddebe clang::Parser::ParseCastExpression(bool, bool, bool&, clang::Parser::TypeCastState) + 4110
11 clang             0x00000001002da527 clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 135
12 clang             0x00000001002f3e0b clang::Parser::ParseBraceInitializer() + 571
13 clang             0x00000001002be0ea clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&, clang::Parser::ParsedTemplateInfo const&) + 1370
14 clang             0x00000001002bca9d clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool, clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1693
15 clang             0x00000001002b9703 clang::Parser::ParseSimpleDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&, bool, clang::Parser::ForRangeInit*) + 483
16 clang             0x00000001002b945c clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 924
17 clang             0x0000000100306791 clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&) + 2033
18 clang             0x0000000100305f0a clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, bool, clang::SourceLocation*) + 154
19 clang             0x000000010030d3be clang::Parser::ParseCompoundStatementBody(bool) + 1598
20 clang             0x000000010030f01b clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) + 171
21 clang             0x000000010031f03f clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, llvm::SmallVector<clang::Parser::LateParsedAttribute*, 2u>*) + 2127
22 clang             0x00000001002bc9b1 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool, clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1457
23 clang             0x000000010031e66b clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec&, clang::AccessSpecifier) + 667
24 clang             0x000000010031e0f1 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*, clang::AccessSpecifier) + 337
25 clang             0x000000010031d643 clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) + 2867
26 clang             0x000000010031ca87 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 311
27 clang             0x00000001002af636 clang::ParseAST(clang::Sema&, bool, bool) + 454
28 clang             0x000000010027299e clang::CodeGenAction::ExecuteAction() + 206
29 clang             0x000000010006fd58 clang::FrontendAction::Execute() + 104
30 clang             0x000000010004487f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 991
31 clang             0x000000010000bc0e clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3470
32 clang             0x000000010000121a cc1_main(char const**, char const**, char const*, void*) + 730
33 clang             0x000000010000843c main + 3388
34 clang             0x0000000100000f34 start + 52
35 clang             0x000000000000000b start + 4294963467
Stack dump:
0.      Program arguments: /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin10-nobootstrap-RA/clang-build/Release+Asserts/bin/clang -cc1 -internal-isystem /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin10-nobootstrap-RA/clang-build/Release+Asserts/bin/../lib/clang/3.2/include -O0 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin10-nobootstrap-RA/clang.src/test/CodeGen/ppc64-struct-onefloat.c 
1.      /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin10-nobootstrap-RA/clang.src/test/CodeGen/ppc64-struct-onefloat.c:41:15: current parser token '155.1l'
2.      /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin10-nobootstrap-RA/clang.src/test/CodeGen/ppc64-struct-onefloat.c:38:1: parsing function body 'foo'
3.      /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin10-nobootstrap-RA/clang.src/test/CodeGen/ppc64-struct-onefloat.c:38:1: in compound statement ('{}')
FileCheck error: '-' is empty.
--

********************
</span></pre></blockquote></div><div><pre style="font-family: 'Courier New', courier, monotype; "><span class="stdout"><br></span></pre></div><br><div><div>On Oct 12, 2012, at 12:26 PM, Bill Schmidt <<a href="mailto:wschmidt@linux.vnet.ibm.com">wschmidt@linux.vnet.ibm.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Author: wschmidt<br>Date: Fri Oct 12 14:26:17 2012<br>New Revision: 165816<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=165816&view=rev">http://llvm.org/viewvc/llvm-project?rev=165816&view=rev</a><br>Log:<br>This patch addresses PR13948.<br><br>For 64-bit PowerPC SVR4, an aggregate containing only one<br>floating-point field (float, double, or long double) must be passed in<br>a register as though just that field were present.  This patch<br>addresses the issue during Clang code generation by specifying in the<br>ABIArgInfo for the argument that the underlying type is passed<br>directly in a register.  The included test case verifies flat and<br>nested structs for the three data types.<br><br>Added:<br>    cfe/trunk/test/CodeGen/ppc64-struct-onefloat.c<br>Modified:<br>    cfe/trunk/lib/CodeGen/TargetInfo.cpp<br><br>Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp<br>URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetInfo.cpp?rev=165816&r1=165815&r2=165816&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetInfo.cpp?rev=165816&r1=165815&r2=165816&view=diff</a><br>==============================================================================<br>--- cfe/trunk/lib/CodeGen/TargetInfo.cpp (original)<br>+++ cfe/trunk/lib/CodeGen/TargetInfo.cpp Fri Oct 12 14:26:17 2012<br>@@ -2602,13 +2602,31 @@<br> public:<br>   PPC64_SVR4_ABIInfo(CodeGen::CodeGenTypes &CGT) : DefaultABIInfo(CGT) {}<br><br>-  // TODO: Could override computeInfo to model the ABI more completely if<br>-  // it would be helpful.  Example: We might remove the byVal flag from<br>-  // aggregate arguments that fit in a register to avoid pushing them to<br>-  // memory on function entry.  Note that this is a performance optimization,<br>-  // not a compliance issue.  In general we prefer to keep ABI details in<br>-  // the back end where possible, but modifying an argument flag seems like<br>-  // a good thing to do before invoking the back end.<br>+  // TODO: We can add more logic to computeInfo to improve performance.<br>+  // Example: For aggregate arguments that fit in a register, we could<br>+  // use getDirectInReg (as is done below for structs containing a single<br>+  // floating-point value) to avoid pushing them to memory on function<br>+  // entry.  This would require changing the logic in PPCISelLowering<br>+  // when lowering the parameters in the caller and args in the callee.<br>+  virtual void computeInfo(CGFunctionInfo &FI) const {<br>+    FI.getReturnInfo() = classifyReturnType(FI.getReturnType());<br>+    for (CGFunctionInfo::arg_iterator it = FI.arg_begin(), ie = FI.arg_end();<br>+         it != ie; ++it) {<br>+      // We rely on the default argument classification for the most part.<br>+      // One exception:  An aggregate containing a single floating-point<br>+      // item must be passed in a register if one is available.<br>+      const Type *T = isSingleElementStruct(it->type, getContext());<br>+      if (T) {<br>+        const BuiltinType *BT = T->getAs<BuiltinType>();<br>+        if (BT && BT->isFloatingPoint()) {<br>+          QualType QT(T, 0);<br>+          it->info = ABIArgInfo::getDirectInReg(CGT.ConvertType(QT));<br>+          continue;<br>+        }<br>+      }<br>+      it->info = classifyArgumentType(it->type);<br>+    }<br>+  }<br><br>   virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, <br>                                  QualType Ty,<br><br>Added: cfe/trunk/test/CodeGen/ppc64-struct-onefloat.c<br>URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ppc64-struct-onefloat.c?rev=165816&view=auto">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ppc64-struct-onefloat.c?rev=165816&view=auto</a><br>==============================================================================<br>--- cfe/trunk/test/CodeGen/ppc64-struct-onefloat.c (added)<br>+++ cfe/trunk/test/CodeGen/ppc64-struct-onefloat.c Fri Oct 12 14:26:17 2012<br>@@ -0,0 +1,65 @@<br>+// REQUIRES: ppc64-registered-target<br>+// RUN: %clang_cc1 -O0 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s<br>+<br>+typedef struct s1 { float f; } Sf;<br>+typedef struct s2 { double d; } Sd;<br>+typedef struct s3 { long double ld; } Sld;<br>+typedef struct s4 { Sf fs; } SSf;<br>+typedef struct s5 { Sd ds; } SSd;<br>+typedef struct s6 { Sld lds; } SSld;<br>+<br>+void bar(Sf a, Sd b, Sld c, SSf d, SSd e, SSld f) {}<br>+<br>+// CHECK: define void @bar<br>+// CHECK:  %a = alloca %struct.s1, align 4<br>+// CHECK:  %b = alloca %struct.s2, align 8<br>+// CHECK:  %c = alloca %struct.s3, align 16<br>+// CHECK:  %d = alloca %struct.s4, align 4<br>+// CHECK:  %e = alloca %struct.s5, align 8<br>+// CHECK:  %f = alloca %struct.s6, align 16<br>+// CHECK:  %coerce.dive = getelementptr %struct.s1* %a, i32 0, i32 0<br>+// CHECK:  store float %a.coerce, float* %coerce.dive, align 1<br>+// CHECK:  %coerce.dive1 = getelementptr %struct.s2* %b, i32 0, i32 0<br>+// CHECK:  store double %b.coerce, double* %coerce.dive1, align 1<br>+// CHECK:  %coerce.dive2 = getelementptr %struct.s3* %c, i32 0, i32 0<br>+// CHECK:  store ppc_fp128 %c.coerce, ppc_fp128* %coerce.dive2, align 1<br>+// CHECK:  %coerce.dive3 = getelementptr %struct.s4* %d, i32 0, i32 0<br>+// CHECK:  %coerce.dive4 = getelementptr %struct.s1* %coerce.dive3, i32 0, i32 0<br>+// CHECK:  store float %d.coerce, float* %coerce.dive4, align 1<br>+// CHECK:  %coerce.dive5 = getelementptr %struct.s5* %e, i32 0, i32 0<br>+// CHECK:  %coerce.dive6 = getelementptr %struct.s2* %coerce.dive5, i32 0, i32 0<br>+// CHECK:  store double %e.coerce, double* %coerce.dive6, align 1<br>+// CHECK:  %coerce.dive7 = getelementptr %struct.s6* %f, i32 0, i32 0<br>+// CHECK:  %coerce.dive8 = getelementptr %struct.s3* %coerce.dive7, i32 0, i32 0<br>+// CHECK:  store ppc_fp128 %f.coerce, ppc_fp128* %coerce.dive8, align 1<br>+// CHECK:  ret void<br>+<br>+void foo(void) <br>+{<br>+  Sf p1 = { 22.63f };<br>+  Sd p2 = { 19.47 };<br>+  Sld p3 = { -155.1l };<br>+  SSf p4 = { { 22.63f } };<br>+  SSd p5 = { { 19.47 } };<br>+  SSld p6 = { { -155.1l } };<br>+  bar(p1, p2, p3, p4, p5, p6);<br>+}<br>+<br>+// CHECK: define void @foo<br>+// CHECK:  %coerce.dive = getelementptr %struct.s1* %p1, i32 0, i32 0<br>+// CHECK:  %{{[0-9]+}} = load float* %coerce.dive, align 1<br>+// CHECK:  %coerce.dive1 = getelementptr %struct.s2* %p2, i32 0, i32 0<br>+// CHECK:  %{{[0-9]+}} = load double* %coerce.dive1, align 1<br>+// CHECK:  %coerce.dive2 = getelementptr %struct.s3* %p3, i32 0, i32 0<br>+// CHECK:  %{{[0-9]+}} = load ppc_fp128* %coerce.dive2, align 1<br>+// CHECK:  %coerce.dive3 = getelementptr %struct.s4* %p4, i32 0, i32 0<br>+// CHECK:  %coerce.dive4 = getelementptr %struct.s1* %coerce.dive3, i32 0, i32 0<br>+// CHECK:  %{{[0-9]+}} = load float* %coerce.dive4, align 1<br>+// CHECK:  %coerce.dive5 = getelementptr %struct.s5* %p5, i32 0, i32 0<br>+// CHECK:  %coerce.dive6 = getelementptr %struct.s2* %coerce.dive5, i32 0, i32 0<br>+// CHECK:  %{{[0-9]+}} = load double* %coerce.dive6, align 1<br>+// CHECK:  %coerce.dive7 = getelementptr %struct.s6* %p6, i32 0, i32 0<br>+// CHECK:  %coerce.dive8 = getelementptr %struct.s3* %coerce.dive7, i32 0, i32 0<br>+// CHECK:  %{{[0-9]+}} = load ppc_fp128* %coerce.dive8, align 1<br>+// CHECK:  call void @bar(float inreg %{{[0-9]+}}, double inreg %{{[0-9]+}}, ppc_fp128 inreg %{{[0-9]+}}, float inreg %{{[0-9]+}}, double inreg %{{[0-9]+}}, ppc_fp128 inreg %{{[0-9]+}})<br>+// CHECK:  ret void<br><br><br>_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits<br></blockquote></div><br></body></html>