http://llvm.org/bugs/show_bug.cgi?id=8180
Summary: TD alignment's treatment in struct differs among
InstCombine and CodeGen
Product: new-bugs
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Consider the IR below;
target datalayout =
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"
%st = type {i8, double}
define double* @foo() {
entry:
%p = getelementptr %st* null,i32 0,i32 1
ret double* %p
}
$ opt -instcombine | llc (f64:32:64)
_foo:
movl $4, %eax
$ opt -instcombine | llc (f64:64:64)
_foo:
movl $8, %eax
$ opt | llc (f64:64:64)
_foo:
movl $4, %eax
On i686-linux, TD contains "f64:32:64".
On powerpc-linux and cygming, f64 ABI alignment is 64(f64:64:64), thus I saw
different results.
FYI, it seems clang relies on ABI alignments.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs