[PATCH] D16867: Debug Info: Allow SROAed complex floating point types to be described by constants

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 16:06:49 PST 2016

aprantl added inline comments.

Comment at: test/DebugInfo/ARM/sroa-complex.ll:16
@@ +15,3 @@
+  ; CHECK: DW_TAG_formal_parameter
+  ; CHECK-NEXT:  DW_AT_const_value [DW_FORM_udata]	(0)
+  tail call void @llvm.dbg.value(metadata i64 0, i64 0, metadata !10, metadata !18), !dbg !17
probinson wrote:
> Huh. So we see udata (0) because the zero value is considered as an integer type rather than a float type? And that's supposed to be the entire 128-bit value?
> I wonder if something else weird is going on with _Complex, because on Linux I get DW_AT_location with an expression that describes only one 8-byte piece.
No this is supposed to be the lower 64 bits of the complex 128-bit value.
In order to reproduce this you need to compile for a target that does not have a native 64-bit double data type. (E.g.: -triple=thumbv7-apple-unknown-macho but not thumbv7-apple-ios)

Comment at: test/DebugInfo/ARM/sroa-complex.ll:50
@@ +49,3 @@
+!15 = !{!"clang version 3.9.0 (trunk 259428)"}
+!16 = !DIExpression()
+!17 = !DILocation(line: 1, scope: !4)
probinson wrote:
> This looks funny, and I don't see a reference to !16 anywhere? Is this possibly the missing other half of the _Complex value?
I am unsure how it could survive given that nothing is referencing it, but this is most likely the DIExpression() of the aggregate complex value before it was SROA'ed.



More information about the llvm-commits mailing list