diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2011-09-12 19:30:40 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2011-09-12 19:30:40 +0000 |
commit | 8e03a821f96d270556b2ffce15174f2f89d856da (patch) | |
tree | cb417d37fcde5510d70c3e2920390a4b3879b56b /test/CodeGen/X86/avx-blend.ll | |
parent | 93474f5f7fe681600d7d12bfa3983f9960ae94ac (diff) | |
download | external_llvm-8e03a821f96d270556b2ffce15174f2f89d856da.zip external_llvm-8e03a821f96d270556b2ffce15174f2f89d856da.tar.gz external_llvm-8e03a821f96d270556b2ffce15174f2f89d856da.tar.bz2 |
Not sure how CMPPS and CMPPD had already ever worked, I guess it didn't.
However with this fix it does now.
Basically the operand order for the x86 target specific node
is not the same as the instruction, but since the intrinsic need that
specific order at the instruction definition, just change the order
during legalization. Also, there were some wrong invertions of condition
codes, such as GE => LE, GT => LT, fix that too. Fix PR10907.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139528 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/avx-blend.ll')
-rw-r--r-- | test/CodeGen/X86/avx-blend.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/X86/avx-blend.ll b/test/CodeGen/X86/avx-blend.ll index e025e26..e3008d9 100644 --- a/test/CodeGen/X86/avx-blend.ll +++ b/test/CodeGen/X86/avx-blend.ll @@ -82,4 +82,23 @@ define <8 x i64> @vsel_i648(<8 x i64> %v1, <8 x i64> %v2) { ret <8 x i64> %vsel } +;; TEST blend + compares +; CHECK: A +define <2 x double> @A(<2 x double> %x, <2 x double> %y) { + ; CHECK: vcmpltpd + ; CHECK: vblendvpd + %max_is_x = fcmp oge <2 x double> %x, %y + %max = select <2 x i1> %max_is_x, <2 x double> %x, <2 x double> %y + ret <2 x double> %max +} + +; CHECK: B +define <2 x double> @B(<2 x double> %x, <2 x double> %y) { + ; CHECK: vcmplepd + ; CHECK: vblendvpd + %max_is_x = fcmp ogt <2 x double> %x, %y + %max = select <2 x i1> %max_is_x, <2 x double> %x, <2 x double> %y + ret <2 x double> %max +} + |