On Apr 21, 2007, at 6:41 PM, Reid Spencer wrote:
On Sat, 2007-04-21 at 18:28 -0500, Christopher Lamb wrote:
On Apr 21, 2007, at 6:12 PM, Reid Spencer wrote:
On Sat, 2007-04-21 at 18:07 -0500, Christopher Lamb wrote:
I'm getting a regression after my fixes that's coming from
getABIAlignment not finding an alignment to use for a <float x1>
type,
is this a bug?
It could be. <float x 1> isn't a useful vector so it probably
doesn't
have an ABI Alignment. It should, however, default to whatever the
target's alignment is for float. Perhaps that case isn't covered in
TargetData or there's something else wrong with TargetData?
Did you walk through it in the debugger?
Yes. It appears that TargetData doesn't have logic to match the case
of vector types smaller than the smallest defined ABI vector type.
It's asserting in TargetData::getAlignmentInfo:
assert(BestMatchIdx != -1 && "Didn't find alignment info for this
datatype!");
That makes sense.
I don't think it has enough information to be able to determine
whether or not it's being asked for the alignment of a smaller vector
type that could be mapped onto a non-vector type.
What is your datalayout specification?
It's MacOS X's data layout:
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"
My feeling is that in this case getAlignmentInfo should return a
conservative fallback alignment the same way that's done for
integers.
Perhaps, we'll need to discuss with Duncan and Chris though.
That's fine. I've split my patch into parts that should be able to be
applied independently. Only the second part depends on this getting
fixed.
--
Christopher Lamb
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits