Displaying 2 results from an estimated 2 matches for "subsd".
Did you mean:
subs
2012 Jun 30
2
[LLVMdev] llc -O# / opt -O# differences
...oord * b) {
dx = a[0].x - a[0].y;
return dx * dx;
}
Running through opt
$ llvm-as < x.ll | opt -O3 | llc > y.s
Produces the following:
_foo: ## @foo
.cfi_startproc
## BB#0: ## %entry
movsd (%rdi), %xmm0
subsd (%rsi), %xmm0
mulsd %xmm0, %xmm0
ret
.cfi_endproc
This also matches what clang compiles from the C function. However,
running through llc with the same optimization flag
$ llc -O3 x.ll -o z.s
_foo: ## @foo
.cfi_startproc
## BB#0:...
2012 Jan 04
1
[LLVMdev] How can I compile a c source file to use SSE2 Data Movement Instructions?
..._f: # @f
# BB#0:
movl $-800, %eax # imm = 0xFFFFFFFFFFFFFCE0
movsd _DA, %xmm0
.align 16, 0x90
LBB0_1: # =>This Inner Loop Header: Depth=1
movsd _X+800(%eax), %xmm1
mulsd %xmm0, %xmm1
movsd _Y+800(%eax), %xmm2
subsd %xmm1, %xmm2
movsd %xmm2, _Y+800(%eax)
addl $8, %eax
jne LBB0_1
# BB#2:
xorl %eax, %eax
ret
.data
.globl _DA # @DA
.align 8
_DA:
.quad 4599075939470750515 # double 3.000000e-01
.comm _Y,800,3 # @Y
.comm _X,800,3 # @X
gcc -S -O3 -o t...