[LLVMbugs] [Bug 11439] New: Operations on double3 mis-optimised to double2
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Nov 26 15:35:56 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=11439
Bug #: 11439
Summary: Operations on double3 mis-optimised to double2
Product: libraries
Version: trunk
Platform: PC
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
AssignedTo: unassignedbugs at nondot.org
ReportedBy: schnetter at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
I am using the release candidate llvm-3.0, checked out from
http://llvm.org/svn/llvm-project/llvm/branches/release_30 and
http://llvm.org/svn/llvm-project/cfe/branches/release_30.
This code tests double3, i.e. a vector of 3 doubles:
typedef double double3 __attribute__((__ext_vector_type__(3)));
double3 add(double3 x) { return x+1.0; }
When compiled without optimisation, the generated code is correct. When
compiled with optimisation, the generated code handles only 2 vector elements.
That is, there is only a single addpd instruction, but there should be two (or
one addpd and one addps).
clang -S -O double3.c
.section __TEXT,__text,regular,pure_instructions
.section __TEXT,__const
.align 4
LCPI0_0:
.quad 4607182418800017408 ## double 1.000000e+00
.quad 4607182418800017408 ## double 1.000000e+00
.section __TEXT,__text,regular,pure_instructions
.globl _add
.align 4, 0x90
_add: ## @add
Ltmp2:
.cfi_startproc
## BB#0:
pushq %rbp
Ltmp3:
.cfi_def_cfa_offset 16
Ltmp4:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp5:
.cfi_def_cfa_register %rbp
addpd LCPI0_0(%rip), %xmm0
popq %rbp
ret
Ltmp6:
.cfi_endproc
Leh_func_end0:
.subsections_via_symbols
--
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.
More information about the llvm-bugs
mailing list