Chris, > These both pass for me. Three options: your CFE isn't up-to-date, > the test is broken for your target, or the compiler is broken for > your target. These two failed for me also. The resulting llvm IR (for "Struct"):
; ModuleID = '/home/asl/proj/llvm/src/test/CFrontend/2007-04-11-InlineAsmStruct.c' target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64" target triple = "i686-pc-linux-gnu" %struct.V = type { i16, i16 } define i32 @bar() { entry: %retval = alloca i32, align 4 ; <i32*> [#uses=2] %tmp = alloca i32, align 4 ; <i32*> [#uses=2] %bar = alloca %struct.V, align 4 ; <%struct.V*> [#uses=2] "alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] call void asm sideeffect "foo $0\0A", "=*r,~{dirflag},~{fpsr},~{flags}"( %struct.V* %bar ) %tmp1 = getelementptr %struct.V* %bar, i32 0, i32 0 ; <i16*> [#uses=1] %tmp2 = load i16* %tmp1 ; <i16> [#uses=1] %tmp23 = sext i16 %tmp2 to i32 ; <i32> [#uses=1] store i32 %tmp23, i32* %tmp %tmp4 = load i32* %tmp ; <i32> [#uses=1] store i32 %tmp4, i32* %retval br label %return return: ; preds = %entry %retval5 = load i32* %retval ; <i32> [#uses=1] ret i32 %retval5 } It seems, extra GEP was used to get result. -- With best regards, Anton Korobeynikov. Faculty of Mathematics & Mechanics, Saint Petersburg State University. _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits