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

Paul Robinson via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 17:29:21 PST 2016

probinson 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
aprantl wrote:
> 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)
How does the consumer know this DW_AT_const_value is only the lower half?  How will it find the upper half?
I brought up the Linux behavior only because it also was not describing the upper half, which makes me think there is some deeper problem with describing Complex values.  Sorry, should have made that clear, I am not expecting Linux to trigger the integer thing.



More information about the llvm-commits mailing list