comparison test/CodeGen/X86/fast-isel-select.ll @ 147:c2174574ed3a

LLVM 10
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 14 Aug 2019 16:55:33 +0900
parents 54457678186b
children
comparison
equal deleted inserted replaced
134:3a76565eade5 147:c2174574ed3a
1 ; RUN: llc -mtriple x86_64-apple-darwin -O0 -o - < %s | FileCheck %s 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
2 ; Make sure we only use the less significant bit of the value that feeds the 4 ; Make sure we only use the less significant bit of the value that feeds the
3 ; select. Otherwise, we may account for a non-zero value whereas the 5 ; select. Otherwise, we may account for a non-zero value whereas the
4 ; lsb is zero. 6 ; lsb is zero.
5 ; <rdar://problem/15651765> 7 ; <rdar://problem/15651765>
6 8
9 define i32 @fastisel_select(i1 %exchSub2211_, i1 %trunc_8766) {
7 ; CHECK-LABEL: fastisel_select: 10 ; CHECK-LABEL: fastisel_select:
8 ; CHECK: subb {{%[a-z0-9]+}}, [[RES:%[a-z0-9]+]] 11 ; CHECK: ## %bb.0:
9 ; CHECK: testb $1, [[RES]] 12 ; CHECK-NEXT: ## kill: def $sil killed $sil killed $esi
10 ; CHECK: cmovnel %edi, %esi 13 ; CHECK-NEXT: ## kill: def $dil killed $dil killed $edi
11 define i32 @fastisel_select(i1 %exchSub2211_, i1 %trunc_8766) { 14 ; CHECK-NEXT: xorl %eax, %eax
15 ; CHECK-NEXT: subb %sil, %dil
16 ; CHECK-NEXT: testb $1, %dil
17 ; CHECK-NEXT: movl $1204476887, %ecx ## imm = 0x47CADBD7
18 ; CHECK-NEXT: cmovnel %ecx, %eax
19 ; CHECK-NEXT: retq
12 %shuffleInternal15257_8932 = sub i1 %exchSub2211_, %trunc_8766 20 %shuffleInternal15257_8932 = sub i1 %exchSub2211_, %trunc_8766
13 %counter_diff1345 = select i1 %shuffleInternal15257_8932, i32 1204476887, i32 0 21 %counter_diff1345 = select i1 %shuffleInternal15257_8932, i32 1204476887, i32 0
14 ret i32 %counter_diff1345 22 ret i32 %counter_diff1345
15 } 23 }
16 24