Skip to content

Commit

Permalink
[X86] Add knownbits vector ADD test
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286511 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
RKSimon committed Nov 10, 2016
1 parent fc1b3b3 commit d3f442d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/CodeGen/X86/known-bits-vector.ll
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,23 @@ define <4 x i32> @knownbits_mask_trunc_shuffle_shl(<4 x i64> %a0) nounwind {
ret <4 x i32> %4
}

define <4 x i32> @knownbits_add_lshr(<4 x i32> %a0, <4 x i32> %a1) nounwind {
; X32-LABEL: knownbits_add_lshr:
; X32: # BB#0:
; X32-NEXT: vxorps %xmm0, %xmm0, %xmm0
; X32-NEXT: retl
;
; X64-LABEL: knownbits_add_lshr:
; X64: # BB#0:
; X64-NEXT: vxorps %xmm0, %xmm0, %xmm0
; X64-NEXT: retq
%1 = and <4 x i32> %a0, <i32 32767, i32 32767, i32 32767, i32 32767>
%2 = and <4 x i32> %a1, <i32 32767, i32 32767, i32 32767, i32 32767>
%3 = add <4 x i32> %1, %2
%4 = lshr <4 x i32> %3, <i32 17, i32 17, i32 17, i32 17>
ret <4 x i32> %4
}

define <4 x i32> @knownbits_sub_lshr(<4 x i32> %a0) nounwind {
; X32-LABEL: knownbits_sub_lshr:
; X32: # BB#0:
Expand Down

0 comments on commit d3f442d

Please sign in to comment.