llvm-6502/test/CodeGen/X86/fold-pcmpeqd-1.ll
Manman Ren 0eb3edea9c X86 Peephole: fold loads to the source register operand if possible.
Machine CSE and other optimizations can remove instructions so folding
is possible at peephole while not possible at ISel.

rdar://10554090 and rdar://11873276


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160919 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-28 16:48:01 +00:00

15 lines
434 B
LLVM

; RUN: llc < %s -march=x86 -mattr=+sse2 | FileCheck %s
define <2 x double> @foo() nounwind {
ret <2 x double> bitcast (<2 x i64><i64 -1, i64 -1> to <2 x double>)
; CHECK: foo:
; CHECK: pcmpeqd %xmm{{[0-9]+}}, %xmm{{[0-9]+}}
; CHECK-NEXT: ret
}
define <2 x double> @bar() nounwind {
ret <2 x double> bitcast (<2 x i64><i64 0, i64 0> to <2 x double>)
; CHECK: bar:
; CHECK: xorps %xmm{{[0-9]+}}, %xmm{{[0-9]+}}
; CHECK-NEXT: ret
}