diff options
author | Elena Demikhovsky <elena.demikhovsky@intel.com> | 2014-08-18 11:59:06 +0000 |
---|---|---|
committer | Elena Demikhovsky <elena.demikhovsky@intel.com> | 2014-08-18 11:59:06 +0000 |
commit | 34d2d76d25f39a07b34b0c66f9a8a1d5174640c7 (patch) | |
tree | 49ef3a4889d13290f98e54a56a6d305c08f15105 /llvm/test | |
parent | f12dc9c802fd2d4445264d56e1f57bde2c48466e (diff) | |
download | bcm5719-llvm-34d2d76d25f39a07b34b0c66f9a8a1d5174640c7.tar.gz bcm5719-llvm-34d2d76d25f39a07b34b0c66f9a8a1d5174640c7.zip |
AVX-512: Fixed a bug in emitting compare for MVT:i1 type.
Added a test.
llvm-svn: 215889
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/CodeGen/X86/avx512-cmp.ll | 14 | ||||
-rw-r--r-- | llvm/test/CodeGen/X86/avx512-trunc-ext.ll | 5 |
2 files changed, 16 insertions, 3 deletions
diff --git a/llvm/test/CodeGen/X86/avx512-cmp.ll b/llvm/test/CodeGen/X86/avx512-cmp.ll index a44cb9d02f2..6e0d18558c5 100644 --- a/llvm/test/CodeGen/X86/avx512-cmp.ll +++ b/llvm/test/CodeGen/X86/avx512-cmp.ll @@ -85,3 +85,17 @@ define i32 @test8(i32 %a1, i32 %a2, i32 %a3) { %res = select i1 %tmp5, i32 1, i32 %a3 ret i32 %res } + +; CHECK-LABEL: test9 +; CHECK: testb +; CHECK-NOT: kmov +; CHECK: ret +define i32 @test9(i64 %a) { + %b = and i64 %a, 1 + %cmp10.i = icmp eq i64 %b, 0 + br i1 %cmp10.i, label %A, label %B +A: + ret i32 6 +B: + ret i32 7 +} diff --git a/llvm/test/CodeGen/X86/avx512-trunc-ext.ll b/llvm/test/CodeGen/X86/avx512-trunc-ext.ll index 5e097be04cd..f1b639e110f 100644 --- a/llvm/test/CodeGen/X86/avx512-trunc-ext.ll +++ b/llvm/test/CodeGen/X86/avx512-trunc-ext.ll @@ -135,9 +135,8 @@ define <16 x i16> @trunc_v16i32_to_v16i16(<16 x i32> %x) { } ; CHECK-LABEL: trunc_i32_to_i1 -; CHECK: andl -; CHECK: kmov -; CHECK: kortest +; CHECK: testb +; CHECK: setne ; CKECK: orl ; CHECK: ret define i16 @trunc_i32_to_i1(i32 %a) { |