• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=x86_64-apple-darwin -O0 | FileCheck %s
3
4; Make sure we only use the less significant bit of the value that feeds the
5; select. Otherwise, we may account for a non-zero value whereas the
6; lsb is zero.
7; <rdar://problem/15651765>
8
9define i32 @fastisel_select(i1 %exchSub2211_, i1 %trunc_8766) {
10; CHECK-LABEL: fastisel_select:
11; CHECK:       ## %bb.0:
12; CHECK-NEXT:    movb %sil, %al
13; CHECK-NEXT:    movb %dil, %cl
14; CHECK-NEXT:    xorl %esi, %esi
15; CHECK-NEXT:    subb %al, %cl
16; CHECK-NEXT:    testb $1, %cl
17; CHECK-NEXT:    movl $1204476887, %edi ## imm = 0x47CADBD7
18; CHECK-NEXT:    cmovnel %edi, %esi
19; CHECK-NEXT:    movl %esi, %eax
20; CHECK-NEXT:    retq
21  %shuffleInternal15257_8932 = sub i1 %exchSub2211_, %trunc_8766
22  %counter_diff1345 = select i1 %shuffleInternal15257_8932, i32 1204476887, i32 0
23  ret i32 %counter_diff1345
24}
25
26