<div dir="ltr">The issue seems to be that i386 sets double alignment at 32-bits, and that's used in ASTContext.cpp (case Type::Complex) to determine a _Complex double's alignment. I'm not sure if that's the right thing to do: the C standard says "alignment requirements as an array type containing exactly two elements of the corresponding real type", and I can't figure out if arrays have extra alignment requirements compared to their base type.<div>
<br></div><div>A simple workaround is to run the test with a specific triple, say x86-64-unknown-unknown. Should I commit such a change, until the above can be resolved?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Jul 17, 2013 at 5:05 PM, Quentin Colombet <span dir="ltr"><<a href="mailto:qcolombet@apple.com" target="_blank">qcolombet@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Hi jfb,<div><br></div><div>This breaks a buildbot:</div><div><a href="http://lab.llvm.org:8013/builders/clang-i386-darwin11-RA/builds/1255" target="_blank">http://lab.llvm.org:8013/builders/clang-i386-darwin11-RA/builds/1255</a></div>
<div><pre style="font-family:'Courier New',courier,monotype;font-size:medium"><span>******************** TEST 'Clang :: CodeGen/volatile-complex.c' FAILED ********************
Script:
--
/Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-i386-darwin11-RA/clang-build/Release+Asserts/bin/clang -cc1 -internal-isystem /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-i386-darwin11-RA/clang-build/Release+Asserts/bin/../lib/clang/3.4/include -emit-llvm /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-i386-darwin11-RA/clang.src/test/CodeGen/volatile-complex.c -o - | FileCheck /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-i386-darwin11-RA/clang.src/test/CodeGen/volatile-complex.c
--
Exit Code: 1
Command Output (stderr):
--
/Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-i386-darwin11-RA/clang.src/test/CodeGen/volatile-complex.c:25:17: error: expected string not found in input
// CHECK-NEXT: load volatile double* getelementptr inbounds ({ double, double }* @cd, i32 0, i32 1), align 8
^
<stdin>:26:2: note: scanning from here
%cd.imag = load volatile double* getelementptr inbounds ({ double, double }* @cd, i32 0, i32 1), align 4
^
<stdin>:26:13: note: possible intended match here
%cd.imag = load volatile double* getelementptr inbounds ({ double, double }* @cd, i32 0, i32 1), align 4
^
--
********************</span></pre><div>Could you have a look please?</div><div><br></div><div>Thanks,</div><div><br></div><div>
<div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;white-space:normal;font-family:Helvetica;word-wrap:break-word;word-spacing:0px">
-Quentin</div>
</div><div><div class="h5">
<br><div><div>On Jul 16, 2013, at 10:57 PM, JF Bastien <<a href="mailto:jfb@google.com" target="_blank">jfb@google.com</a>> wrote:</div><br><blockquote type="cite"><div style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
Author: jfb<br>Date: Wed Jul 17 00:57:42 2013<br>New Revision: 186490<br><br>URL:<span> </span><a href="http://llvm.org/viewvc/llvm-project?rev=186490&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=186490&view=rev</a><br>
Log:<br>Propagate alignment for _Complex<br><br>_Complex load/store didn't have their alignment set properly, which was visible when GCC's torture tests use volatile _Complex.<br><br>Update some existing tests to check for alignment, and add a new test which also has over-aligned volatile _Complex (since the imaginary part shouldn't be overaligned, only the real part).<br>
<br>Added:<br> cfe/trunk/test/CodeGen/volatile-complex.c (with props)<br>Modified:<br> cfe/trunk/lib/CodeGen/CGExprComplex.cpp<br> cfe/trunk/test/CodeGen/volatile-1.c<br> cfe/trunk/test/CodeGen/volatile-2.c<br><br>
Modified: cfe/trunk/lib/CodeGen/CGExprComplex.cpp<br>URL:<span> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprComplex.cpp?rev=186490&r1=186489&r2=186490&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprComplex.cpp?rev=186490&r1=186489&r2=186490&view=diff</a><br>
==============================================================================<br>--- cfe/trunk/lib/CodeGen/CGExprComplex.cpp (original)<br>+++ cfe/trunk/lib/CodeGen/CGExprComplex.cpp Wed Jul 17 00:57:42 2013<br>@@ -18,6 +18,7 @@<br>
#include "llvm/ADT/SmallString.h"<br>#include "llvm/IR/Constants.h"<br>#include "llvm/IR/Function.h"<br>+#include <algorithm><br>using namespace clang;<br>using namespace CodeGen;<br><br>
@@ -297,19 +298,26 @@ ComplexPairTy ComplexExprEmitter::EmitLo<br><br> llvm::Value *SrcPtr = lvalue.getAddress();<br> bool isVolatile = lvalue.isVolatileQualified();<br>+ unsigned AlignR = lvalue.getAlignment().getQuantity();<br>
+ ASTContext &C = CGF.getContext();<br>+ QualType ComplexTy = lvalue.getType();<br>+ unsigned ComplexAlign = C.getTypeAlignInChars(ComplexTy).getQuantity();<br>+ unsigned AlignI = std::min(AlignR, ComplexAlign);<br>
<br> llvm::Value *Real=0, *Imag=0;<br><br> if (!IgnoreReal || isVolatile) {<br> llvm::Value *RealP = Builder.CreateStructGEP(SrcPtr, 0,<br> SrcPtr->getName() + ".realp");<br>
- Real = Builder.CreateLoad(RealP, isVolatile, SrcPtr->getName() + ".real");<br>+ Real = Builder.CreateAlignedLoad(RealP, AlignR, isVolatile,<br>+ SrcPtr->getName() + ".real");<br>
}<br><br> if (!IgnoreImag || isVolatile) {<br> llvm::Value *ImagP = Builder.CreateStructGEP(SrcPtr, 1,<br> SrcPtr->getName() + ".imagp");<br>- Imag = Builder.CreateLoad(ImagP, isVolatile, SrcPtr->getName() + ".imag");<br>
+ Imag = Builder.CreateAlignedLoad(ImagP, AlignI, isVolatile,<br>+ SrcPtr->getName() + ".imag");<br> }<br> return ComplexPairTy(Real, Imag);<br>}<br>@@ -325,10 +333,16 @@ void ComplexExprEmitter::EmitStoreOfComp<br>
llvm::Value *Ptr = lvalue.getAddress();<br> llvm::Value *RealPtr = Builder.CreateStructGEP(Ptr, 0, "real");<br> llvm::Value *ImagPtr = Builder.CreateStructGEP(Ptr, 1, "imag");<br>-<br>- // TODO: alignment<br>
- Builder.CreateStore(Val.first, RealPtr, lvalue.isVolatileQualified());<br>- Builder.CreateStore(Val.second, ImagPtr, lvalue.isVolatileQualified());<br>+ unsigned AlignR = lvalue.getAlignment().getQuantity();<br>+ ASTContext &C = CGF.getContext();<br>
+ QualType ComplexTy = lvalue.getType();<br>+ unsigned ComplexAlign = C.getTypeAlignInChars(ComplexTy).getQuantity();<br>+ unsigned AlignI = std::min(AlignR, ComplexAlign);<br>+<br>+ Builder.CreateAlignedStore(Val.first, RealPtr, AlignR,<br>
+ lvalue.isVolatileQualified());<br>+ Builder.CreateAlignedStore(Val.second, ImagPtr, AlignI,<br>+ lvalue.isVolatileQualified());<br>}<br><br><br><br>Modified: cfe/trunk/test/CodeGen/volatile-1.c<br>
URL:<span> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/volatile-1.c?rev=186490&r1=186489&r2=186490&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/volatile-1.c?rev=186490&r1=186489&r2=186490&view=diff</a><br>
==============================================================================<br>--- cfe/trunk/test/CodeGen/volatile-1.c (original)<br>+++ cfe/trunk/test/CodeGen/volatile-1.c Wed Jul 17 00:57:42 2013<br>@@ -26,45 +26,45 @@ int printf(const char *, ...);<br>
void test() {<br> // CHECK: load volatile [[INT]]* @i<br> i;<br>- // CHECK-NEXT: load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 0)<br>- // CHECK-NEXT: load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 1)<br>
+ // CHECK-NEXT: load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 0), align 4<br>+ // CHECK-NEXT: load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 1), align 4<br> // CHECK-NEXT: sitofp [[INT]]<br>
(float)(ci);<br>- // CHECK-NEXT: load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 0)<br>- // CHECK-NEXT: load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 1)<br>+ // CHECK-NEXT: load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 0), align 4<br>
+ // CHECK-NEXT: load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 1), align 4<br> (void)ci;<br> // CHECK-NEXT: bitcast<br> // CHECK-NEXT: memcpy<br> (void)a;<br>- // CHECK-NEXT: [[R:%.*]] = load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 0)<br>
- // CHECK-NEXT: [[I:%.*]] = load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 1)<br>- // CHECK-NEXT: store volatile [[INT]] [[R]], [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 0)<br>
- // CHECK-NEXT: store volatile [[INT]] [[I]], [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 1)<br>+ // CHECK-NEXT: [[R:%.*]] = load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 0), align 4<br>
+ // CHECK-NEXT: [[I:%.*]] = load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 1), align 4<br>+ // CHECK-NEXT: store volatile [[INT]] [[R]], [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 0), align 4<br>
+ // CHECK-NEXT: store volatile [[INT]] [[I]], [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 1), align 4<br> (void)(ci=ci);<br> // CHECK-NEXT: [[T:%.*]] = load volatile [[INT]]* @j<br> // CHECK-NEXT: store volatile [[INT]] [[T]], [[INT]]* @i<br>
(void)(i=j);<br>- // CHECK-NEXT: [[R1:%.*]] = load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 0)<br>- // CHECK-NEXT: [[I1:%.*]] = load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 1)<br>
- // CHECK-NEXT: [[R2:%.*]] = load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 0)<br>- // CHECK-NEXT: [[I2:%.*]] = load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 1)<br>+ // CHECK-NEXT: [[R1:%.*]] = load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 0), align 4<br>
+ // CHECK-NEXT: [[I1:%.*]] = load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 1), align 4<br>+ // CHECK-NEXT: [[R2:%.*]] = load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 0), align 4<br>
+ // CHECK-NEXT: [[I2:%.*]] = load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 1), align 4<br> // Not sure why they're ordered this way.<br> // CHECK-NEXT: [[R:%.*]] = add [[INT]] [[R2]], [[R1]]<br>
// CHECK-NEXT: [[I:%.*]] = add [[INT]] [[I2]], [[I1]]<br>- // CHECK-NEXT: store volatile [[INT]] [[R]], [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 0)<br>- // CHECK-NEXT: store volatile [[INT]] [[I]], [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 1)<br>
+ // CHECK-NEXT: store volatile [[INT]] [[R]], [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 0), align 4<br>+ // CHECK-NEXT: store volatile [[INT]] [[I]], [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 1), align 4<br>
ci+=ci;<br><br>- // CHECK-NEXT: [[R1:%.*]] = load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 0)<br>- // CHECK-NEXT: [[I1:%.*]] = load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 1)<br>
- // CHECK-NEXT: [[R2:%.*]] = load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 0)<br>- // CHECK-NEXT: [[I2:%.*]] = load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 1)<br>+ // CHECK-NEXT: [[R1:%.*]] = load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 0), align 4<br>
+ // CHECK-NEXT: [[I1:%.*]] = load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 1), align 4<br>+ // CHECK-NEXT: [[R2:%.*]] = load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 0), align 4<br>
+ // CHECK-NEXT: [[I2:%.*]] = load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 1), align 4<br> // CHECK-NEXT: [[R:%.*]] = add [[INT]] [[R2]], [[R1]]<br> // CHECK-NEXT: [[I:%.*]] = add [[INT]] [[I2]], [[I1]]<br>
- // CHECK-NEXT: store volatile [[INT]] [[R]], [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 0)<br>- // CHECK-NEXT: store volatile [[INT]] [[I]], [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 1)<br>
- // CHECK-NEXT: [[R2:%.*]] = load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 0)<br>- // CHECK-NEXT: [[I2:%.*]] = load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 1)<br>+ // CHECK-NEXT: store volatile [[INT]] [[R]], [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 0), align 4<br>
+ // CHECK-NEXT: store volatile [[INT]] [[I]], [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 1), align 4<br>+ // CHECK-NEXT: [[R2:%.*]] = load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 0), align 4<br>
+ // CHECK-NEXT: [[I2:%.*]] = load volatile [[INT]]* getelementptr inbounds ([[CINT]]* @ci, i32 0, i32 1), align 4<br> // These additions can be elided<br> // CHECK-NEXT: add [[INT]] [[R]], [[R2]]<br> // CHECK-NEXT: add [[INT]] [[I]], [[I2]]<br>
<br>Modified: cfe/trunk/test/CodeGen/volatile-2.c<br>URL:<span> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/volatile-2.c?rev=186490&r1=186489&r2=186490&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/volatile-2.c?rev=186490&r1=186489&r2=186490&view=diff</a><br>
==============================================================================<br>--- cfe/trunk/test/CodeGen/volatile-2.c (original)<br>+++ cfe/trunk/test/CodeGen/volatile-2.c Wed Jul 17 00:57:42 2013<br>@@ -3,8 +3,8 @@<br>
void test0() {<br> // CHECK: define void @test0()<br> // CHECK: [[F:%.*]] = alloca float<br>- // CHECK-NEXT: [[REAL:%.*]] = load volatile float* getelementptr inbounds ({ float, float }* @test0_v, i32 0, i32 0)<br>
- // CHECK-NEXT: load volatile float* getelementptr inbounds ({{.*}} @test0_v, i32 0, i32 1)<br>+ // CHECK-NEXT: [[REAL:%.*]] = load volatile float* getelementptr inbounds ({ float, float }* @test0_v, i32 0, i32 0), align 4<br>
+ // CHECK-NEXT: load volatile float* getelementptr inbounds ({{.*}} @test0_v, i32 0, i32 1), align 4<br> // CHECK-NEXT: store float [[REAL]], float* [[F]], align 4<br> // CHECK-NEXT: ret void<br> extern volatile _Complex float test0_v;<br>
@@ -13,10 +13,10 @@ void test0() {<br><br>void test1() {<br> // CHECK: define void @test1()<br>- // CHECK: [[REAL:%.*]] = load volatile float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 0)<br>- // CHECK-NEXT: [[IMAG:%.*]] = load volatile float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 1)<br>
- // CHECK-NEXT: store volatile float [[REAL]], float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 0)<br>- // CHECK-NEXT: store volatile float [[IMAG]], float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 1)<br>
+ // CHECK: [[REAL:%.*]] = load volatile float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 0), align 4<br>+ // CHECK-NEXT: [[IMAG:%.*]] = load volatile float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 1), align 4<br>
+ // CHECK-NEXT: store volatile float [[REAL]], float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 0), align 4<br>+ // CHECK-NEXT: store volatile float [[IMAG]], float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 1), align 4<br>
// CHECK-NEXT: ret void<br> extern volatile _Complex float test1_v;<br> test1_v = test1_v;<br><br>Added: cfe/trunk/test/CodeGen/volatile-complex.c<br>URL:<span> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/volatile-complex.c?rev=186490&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/volatile-complex.c?rev=186490&view=auto</a><br>
==============================================================================<br>--- cfe/trunk/test/CodeGen/volatile-complex.c (added)<br>+++ cfe/trunk/test/CodeGen/volatile-complex.c Wed Jul 17 00:57:42 2013<br>@@ -0,0 +1,63 @@<br>
+// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s<br>+<br>+volatile _Complex float cf;<br>+volatile _Complex double cd;<br>+volatile _Complex float cf32 __attribute__((aligned(32)));<br>+volatile _Complex double cd32 __attribute__((aligned(32)));<br>
+<br>+<br>+// CHECK: define void @test_cf()<br>+// CHECK-NEXT: entry:<br>+void test_cf() {<br>+ // CHECK-NEXT: load volatile float* getelementptr inbounds ({ float, float }* @cf, i32 0, i32 0), align 4<br>+ // CHECK-NEXT: load volatile float* getelementptr inbounds ({ float, float }* @cf, i32 0, i32 1), align 4<br>
+ (void)(cf);<br>+ // CHECK-NEXT: [[R:%.*]] = load volatile float* getelementptr inbounds ({ float, float }* @cf, i32 0, i32 0), align 4<br>+ // CHECK-NEXT: [[I:%.*]] = load volatile float* getelementptr inbounds ({ float, float }* @cf, i32 0, i32 1), align 4<br>
+ // CHECK-NEXT: store volatile float [[R]], float* getelementptr inbounds ({ float, float }* @cf, i32 0, i32 0), align 4<br>+ // CHECK-NEXT: store volatile float [[I]], float* getelementptr inbounds ({ float, float }* @cf, i32 0, i32 1), align 4<br>
+ (void)(cf=cf);<br>+ // CHECK-NEXT: ret void<br>+}<br>+<br>+// CHECK: define void @test_cd()<br>+// CHECK-NEXT: entry:<br>+void test_cd() {<br>+ // CHECK-NEXT: load volatile double* getelementptr inbounds ({ double, double }* @cd, i32 0, i32 0), align 8<br>
+ // CHECK-NEXT: load volatile double* getelementptr inbounds ({ double, double }* @cd, i32 0, i32 1), align 8<br>+ (void)(cd);<br>+ // CHECK-NEXT: [[R:%.*]] = load volatile double* getelementptr inbounds ({ double, double }* @cd, i32 0, i32 0), align 8<br>
+ // CHECK-NEXT: [[I:%.*]] = load volatile double* getelementptr inbounds ({ double, double }* @cd, i32 0, i32 1), align 8<br>+ // CHECK-NEXT: store volatile double [[R]], double* getelementptr inbounds ({ double, double }* @cd, i32 0, i32 0), align 8<br>
+ // CHECK-NEXT: store volatile double [[I]], double* getelementptr inbounds ({ double, double }* @cd, i32 0, i32 1), align 8<br>+ (void)(cd=cd);<br>+ // CHECK-NEXT: ret void<br>+}<br>+<br>+// CHECK: define void @test_cf32()<br>
+// CHECK-NEXT: entry:<br>+void test_cf32() {<br>+ // CHECK-NEXT: load volatile float* getelementptr inbounds ({ float, float }* @cf32, i32 0, i32 0), align 32<br>+ // CHECK-NEXT: load volatile float* getelementptr inbounds ({ float, float }* @cf32, i32 0, i32 1), align 4<br>
+ (void)(cf32);<br>+ // CHECK-NEXT: [[R:%.*]] = load volatile float* getelementptr inbounds ({ float, float }* @cf32, i32 0, i32 0), align 32<br>+ // CHECK-NEXT: [[I:%.*]] = load volatile float* getelementptr inbounds ({ float, float }* @cf32, i32 0, i32 1), align 4<br>
+ // CHECK-NEXT: store volatile float [[R]], float* getelementptr inbounds ({ float, float }* @cf32, i32 0, i32 0), align 32<br>+ // CHECK-NEXT: store volatile float [[I]], float* getelementptr inbounds ({ float, float }* @cf32, i32 0, i32 1), align 4<br>
+ (void)(cf32=cf32);<br>+ // CHECK-NEXT: ret void<br>+}<br>+<br>+// CHECK: define void @test_cd32()<br>+// CHECK-NEXT: entry:<br>+void test_cd32() {<br>+ // CHECK-NEXT: load volatile double* getelementptr inbounds ({ double, double }* @cd32, i32 0, i32 0), align 32<br>
+ // CHECK-NEXT: load volatile double* getelementptr inbounds ({ double, double }* @cd32, i32 0, i32 1), align 8<br>+ (void)(cd32);<br>+ // CHECK-NEXT: [[R:%.*]] = load volatile double* getelementptr inbounds ({ double, double }* @cd32, i32 0, i32 0), align 32<br>
+ // CHECK-NEXT: [[I:%.*]] = load volatile double* getelementptr inbounds ({ double, double }* @cd32, i32 0, i32 1), align 8<br>+ // CHECK-NEXT: store volatile double [[R]], double* getelementptr inbounds ({ double, double }* @cd32, i32 0, i32 0), align 32<br>
+ // CHECK-NEXT: store volatile double [[I]], double* getelementptr inbounds ({ double, double }* @cd32, i32 0, i32 1), align 8<br>+ (void)(cd32=cd32);<br>+ // CHECK-NEXT: ret void<br>+}<br><br>Propchange: cfe/trunk/test/CodeGen/volatile-complex.c<br>
------------------------------------------------------------------------------<br> svn:eol-style = LF<br><br><br>_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a></div></blockquote></div><br></div></div></div></div></blockquote></div><br></div>