Index: llvm/trunk/lib/Target/X86/X86.td =================================================================== --- llvm/trunk/lib/Target/X86/X86.td +++ llvm/trunk/lib/Target/X86/X86.td @@ -904,7 +904,7 @@ def : Proc<"k6-3", [FeatureX87, FeatureSlowUAMem16, Feature3DNow]>; foreach P = ["athlon", "athlon-tbird"] in { - def : Proc; } Index: llvm/trunk/test/CodeGen/X86/select.ll =================================================================== --- llvm/trunk/test/CodeGen/X86/select.ll +++ llvm/trunk/test/CodeGen/X86/select.ll @@ -1,6 +1,7 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -mcpu=generic | FileCheck %s --check-prefix=CHECK --check-prefix=GENERIC ; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -mcpu=atom | FileCheck %s --check-prefix=CHECK --check-prefix=ATOM +; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -mcpu=athlon | FileCheck %s --check-prefix=ATHLON ; RUN: llc < %s -mtriple=i386-intel-elfiamcu | FileCheck %s --check-prefix=MCU ; PR5757 @@ -16,6 +17,15 @@ ; CHECK-NEXT: movl (%rsi), %eax ; CHECK-NEXT: retq ; +; ATHLON-LABEL: test1: +; ATHLON: ## %bb.0: +; ATHLON-NEXT: addq $8, %rdi +; ATHLON-NEXT: addq $8, %rsi +; ATHLON-NEXT: testb $1, %dl +; ATHLON-NEXT: cmovneq %rdi, %rsi +; ATHLON-NEXT: movl (%rsi), %eax +; ATHLON-NEXT: retq +; ; MCU-LABEL: test1: ; MCU: # %bb.0: ; MCU-NEXT: testb $1, %cl @@ -73,6 +83,24 @@ ; ATOM-NEXT: LBB1_1: ## %bb90 ; ATOM-NEXT: ud2 ; +; ATHLON-LABEL: test2: +; ATHLON: ## %bb.0: ## %entry +; ATHLON-NEXT: pushq %rax +; ATHLON-NEXT: callq _return_false +; ATHLON-NEXT: xorl %ecx, %ecx +; ATHLON-NEXT: testb $1, %al +; ATHLON-NEXT: movl $-480, %eax ## imm = 0xFE20 +; ATHLON-NEXT: cmovnel %ecx, %eax +; ATHLON-NEXT: shll $3, %eax +; ATHLON-NEXT: cmpl $32768, %eax ## imm = 0x8000 +; ATHLON-NEXT: jge LBB1_1 +; ATHLON-NEXT: ## %bb.2: ## %bb91 +; ATHLON-NEXT: xorl %eax, %eax +; ATHLON-NEXT: popq %rcx +; ATHLON-NEXT: retq +; ATHLON-NEXT: LBB1_1: ## %bb90 +; ATHLON-NEXT: ud2 +; ; MCU-LABEL: test2: ; MCU: # %bb.0: # %entry ; MCU-NEXT: calll return_false @@ -124,6 +152,15 @@ ; ATOM-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero ; ATOM-NEXT: retq ; +; ATHLON-LABEL: test3: +; ATHLON: ## %bb.0: ## %entry +; ATHLON-NEXT: xorl %eax, %eax +; ATHLON-NEXT: testl %edi, %edi +; ATHLON-NEXT: sete %al +; ATHLON-NEXT: leaq {{.*}}(%rip), %rcx +; ATHLON-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero +; ATHLON-NEXT: retq +; ; MCU-LABEL: test3: ; MCU: # %bb.0: # %entry ; MCU-NEXT: xorl %ecx, %ecx @@ -147,6 +184,15 @@ ; CHECK-NEXT: movsbl (%rdi,%rax,4), %eax ; CHECK-NEXT: retq ; +; ATHLON-LABEL: test4: +; ATHLON: ## %bb.0: ## %entry +; ATHLON-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero +; ATHLON-NEXT: xorl %eax, %eax +; ATHLON-NEXT: ucomisd %xmm0, %xmm1 +; ATHLON-NEXT: seta %al +; ATHLON-NEXT: movsbl (%rdi,%rax,4), %eax +; ATHLON-NEXT: retq +; ; MCU-LABEL: test4: ; MCU: # %bb.0: # %entry ; MCU-NEXT: movl %eax, %ecx @@ -181,6 +227,18 @@ ; CHECK-NEXT: movd %xmm0, (%rsi) ; CHECK-NEXT: retq ; +; ATHLON-LABEL: test5: +; ATHLON: ## %bb.0: +; ATHLON-NEXT: testb $1, %dil +; ATHLON-NEXT: jne LBB4_2 +; ATHLON-NEXT: ## %bb.1: +; ATHLON-NEXT: movdqa %xmm1, %xmm0 +; ATHLON-NEXT: LBB4_2: +; ATHLON-NEXT: pshufd {{.*#+}} xmm0 = xmm0[0,2,2,3] +; ATHLON-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[0,2,2,3,4,5,6,7] +; ATHLON-NEXT: movd %xmm0, (%rsi) +; ATHLON-NEXT: retq +; ; MCU-LABEL: test5: ; MCU: # %bb.0: ; MCU-NEXT: pushl %esi @@ -216,6 +274,20 @@ ; CHECK-NEXT: movaps %xmm0, (%rsi) ; CHECK-NEXT: retq ; +; ATHLON-LABEL: test6: +; ATHLON: ## %bb.0: +; ATHLON-NEXT: testl %edi, %edi +; ATHLON-NEXT: je LBB5_1 +; ATHLON-NEXT: ## %bb.2: +; ATHLON-NEXT: movaps (%rsi), %xmm0 +; ATHLON-NEXT: movaps %xmm0, (%rsi) +; ATHLON-NEXT: retq +; ATHLON-NEXT: LBB5_1: +; ATHLON-NEXT: movaps (%rdx), %xmm0 +; ATHLON-NEXT: mulps %xmm0, %xmm0 +; ATHLON-NEXT: movaps %xmm0, (%rsi) +; ATHLON-NEXT: retq +; ; MCU-LABEL: test6: ; MCU: # %bb.0: ; MCU-NEXT: pushl %eax @@ -297,6 +369,16 @@ ; ATOM-NEXT: fldt (%rax,%rcx) ; ATOM-NEXT: retq ; +; ATHLON-LABEL: test7: +; ATHLON: ## %bb.0: +; ATHLON-NEXT: xorl %eax, %eax +; ATHLON-NEXT: testl %edi, %edi +; ATHLON-NEXT: setns %al +; ATHLON-NEXT: shlq $4, %rax +; ATHLON-NEXT: leaq {{.*}}(%rip), %rcx +; ATHLON-NEXT: fldt (%rax,%rcx) +; ATHLON-NEXT: retq +; ; MCU-LABEL: test7: ; MCU: # %bb.0: ; MCU-NEXT: notl %eax @@ -378,6 +460,40 @@ ; ATOM-NEXT: movdqa %xmm0, (%rsi) ; ATOM-NEXT: retq ; +; ATHLON-LABEL: test8: +; ATHLON: ## %bb.0: +; ATHLON-NEXT: testb $1, %dil +; ATHLON-NEXT: jne LBB7_1 +; ATHLON-NEXT: ## %bb.2: +; ATHLON-NEXT: movd {{.*#+}} xmm0 = mem[0],zero,zero,zero +; ATHLON-NEXT: movd {{.*#+}} xmm1 = mem[0],zero,zero,zero +; ATHLON-NEXT: punpckldq {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1] +; ATHLON-NEXT: movd {{.*#+}} xmm2 = mem[0],zero,zero,zero +; ATHLON-NEXT: movd {{.*#+}} xmm0 = mem[0],zero,zero,zero +; ATHLON-NEXT: punpckldq {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1] +; ATHLON-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0] +; ATHLON-NEXT: movd {{.*#+}} xmm2 = mem[0],zero,zero,zero +; ATHLON-NEXT: movd {{.*#+}} xmm1 = mem[0],zero,zero,zero +; ATHLON-NEXT: jmp LBB7_3 +; ATHLON-NEXT: LBB7_1: +; ATHLON-NEXT: movd %r9d, %xmm0 +; ATHLON-NEXT: movd %r8d, %xmm1 +; ATHLON-NEXT: punpckldq {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1] +; ATHLON-NEXT: movd %ecx, %xmm2 +; ATHLON-NEXT: movd %edx, %xmm0 +; ATHLON-NEXT: punpckldq {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1] +; ATHLON-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0] +; ATHLON-NEXT: movd {{.*#+}} xmm2 = mem[0],zero,zero,zero +; ATHLON-NEXT: movd {{.*#+}} xmm1 = mem[0],zero,zero,zero +; ATHLON-NEXT: LBB7_3: +; ATHLON-NEXT: punpckldq {{.*#+}} xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1] +; ATHLON-NEXT: pcmpeqd %xmm2, %xmm2 +; ATHLON-NEXT: paddd %xmm2, %xmm0 +; ATHLON-NEXT: paddd %xmm2, %xmm1 +; ATHLON-NEXT: movq %xmm1, 16(%rsi) +; ATHLON-NEXT: movdqa %xmm0, (%rsi) +; ATHLON-NEXT: retq +; ; MCU-LABEL: test8: ; MCU: # %bb.0: ; MCU-NEXT: pushl %ebp @@ -476,6 +592,13 @@ ; ATOM-NEXT: nop ; ATOM-NEXT: retq ; +; ATHLON-LABEL: test9: +; ATHLON: ## %bb.0: +; ATHLON-NEXT: cmpq $1, %rdi +; ATHLON-NEXT: sbbq %rax, %rax +; ATHLON-NEXT: orq %rsi, %rax +; ATHLON-NEXT: retq +; ; MCU-LABEL: test9: ; MCU: # %bb.0: ; MCU-NEXT: orl %edx, %eax @@ -511,6 +634,13 @@ ; ATOM-NEXT: nop ; ATOM-NEXT: retq ; +; ATHLON-LABEL: test9a: +; ATHLON: ## %bb.0: +; ATHLON-NEXT: cmpq $1, %rdi +; ATHLON-NEXT: sbbq %rax, %rax +; ATHLON-NEXT: orq %rsi, %rax +; ATHLON-NEXT: retq +; ; MCU-LABEL: test9a: ; MCU: # %bb.0: ; MCU-NEXT: orl %edx, %eax @@ -544,6 +674,13 @@ ; ATOM-NEXT: nop ; ATOM-NEXT: retq ; +; ATHLON-LABEL: test9b: +; ATHLON: ## %bb.0: +; ATHLON-NEXT: cmpq $1, %rdi +; ATHLON-NEXT: sbbq %rax, %rax +; ATHLON-NEXT: orq %rsi, %rax +; ATHLON-NEXT: retq +; ; MCU-LABEL: test9b: ; MCU: # %bb.0: ; MCU-NEXT: movl %edx, %ecx @@ -571,6 +708,14 @@ ; CHECK-NEXT: leaq -1(%rax,%rax), %rax ; CHECK-NEXT: retq ; +; ATHLON-LABEL: test10: +; ATHLON: ## %bb.0: +; ATHLON-NEXT: xorl %eax, %eax +; ATHLON-NEXT: testq %rdi, %rdi +; ATHLON-NEXT: setne %al +; ATHLON-NEXT: leaq -1(%rax,%rax), %rax +; ATHLON-NEXT: retq +; ; MCU-LABEL: test10: ; MCU: # %bb.0: ; MCU-NEXT: orl %edx, %eax @@ -596,6 +741,14 @@ ; CHECK-NEXT: orq %rsi, %rax ; CHECK-NEXT: retq ; +; ATHLON-LABEL: test11: +; ATHLON: ## %bb.0: +; ATHLON-NEXT: cmpq $1, %rdi +; ATHLON-NEXT: sbbq %rax, %rax +; ATHLON-NEXT: notq %rax +; ATHLON-NEXT: orq %rsi, %rax +; ATHLON-NEXT: retq +; ; MCU-LABEL: test11: ; MCU: # %bb.0: ; MCU-NEXT: orl %edx, %eax @@ -622,6 +775,14 @@ ; CHECK-NEXT: orq %rsi, %rax ; CHECK-NEXT: retq ; +; ATHLON-LABEL: test11a: +; ATHLON: ## %bb.0: +; ATHLON-NEXT: cmpq $1, %rdi +; ATHLON-NEXT: sbbq %rax, %rax +; ATHLON-NEXT: notq %rax +; ATHLON-NEXT: orq %rsi, %rax +; ATHLON-NEXT: retq +; ; MCU-LABEL: test11a: ; MCU: # %bb.0: ; MCU-NEXT: orl %edx, %eax @@ -655,6 +816,12 @@ ; ATOM-NEXT: nop ; ATOM-NEXT: retq ; +; ATHLON-LABEL: test13: +; ATHLON: ## %bb.0: +; ATHLON-NEXT: cmpl %esi, %edi +; ATHLON-NEXT: sbbl %eax, %eax +; ATHLON-NEXT: retq +; ; MCU-LABEL: test13: ; MCU: # %bb.0: ; MCU-NEXT: cmpl %edx, %eax @@ -674,6 +841,14 @@ ; CHECK-NEXT: negl %eax ; CHECK-NEXT: retq ; +; ATHLON-LABEL: test14: +; ATHLON: ## %bb.0: +; ATHLON-NEXT: xorl %eax, %eax +; ATHLON-NEXT: cmpl %esi, %edi +; ATHLON-NEXT: setae %al +; ATHLON-NEXT: negl %eax +; ATHLON-NEXT: retq +; ; MCU-LABEL: test14: ; MCU: # %bb.0: ; MCU-NEXT: xorl %ecx, %ecx @@ -705,6 +880,12 @@ ; ATOM-NEXT: nop ; ATOM-NEXT: retq ; +; ATHLON-LABEL: test15: +; ATHLON: ## %bb.0: ## %entry +; ATHLON-NEXT: negl %edi +; ATHLON-NEXT: sbbl %eax, %eax +; ATHLON-NEXT: retq +; ; MCU-LABEL: test15: ; MCU: # %bb.0: # %entry ; MCU-NEXT: negl %eax @@ -733,6 +914,12 @@ ; ATOM-NEXT: nop ; ATOM-NEXT: retq ; +; ATHLON-LABEL: test16: +; ATHLON: ## %bb.0: ## %entry +; ATHLON-NEXT: negq %rdi +; ATHLON-NEXT: sbbq %rax, %rax +; ATHLON-NEXT: retq +; ; MCU-LABEL: test16: ; MCU: # %bb.0: # %entry ; MCU-NEXT: movl %eax, %ecx @@ -767,6 +954,13 @@ ; ATOM-NEXT: nop ; ATOM-NEXT: retq ; +; ATHLON-LABEL: test17: +; ATHLON: ## %bb.0: ## %entry +; ATHLON-NEXT: negw %di +; ATHLON-NEXT: sbbl %eax, %eax +; ATHLON-NEXT: ## kill: def $ax killed $ax killed $eax +; ATHLON-NEXT: retq +; ; MCU-LABEL: test17: ; MCU: # %bb.0: # %entry ; MCU-NEXT: negw %ax @@ -796,6 +990,13 @@ ; ATOM-NEXT: nop ; ATOM-NEXT: retq ; +; ATHLON-LABEL: test18: +; ATHLON: ## %bb.0: +; ATHLON-NEXT: cmpl $15, %edi +; ATHLON-NEXT: cmovgel %edx, %esi +; ATHLON-NEXT: movl %esi, %eax +; ATHLON-NEXT: retq +; ; MCU-LABEL: test18: ; MCU: # %bb.0: ; MCU-NEXT: cmpl $15, %eax @@ -819,6 +1020,14 @@ ; CHECK-NEXT: movl %edi, %eax ; CHECK-NEXT: retq ; +; ATHLON-LABEL: trunc_select_miscompile: +; ATHLON: ## %bb.0: +; ATHLON-NEXT: orb $2, %sil +; ATHLON-NEXT: movl %esi, %ecx +; ATHLON-NEXT: shll %cl, %edi +; ATHLON-NEXT: movl %edi, %eax +; ATHLON-NEXT: retq +; ; MCU-LABEL: trunc_select_miscompile: ; MCU: # %bb.0: ; MCU-NEXT: orb $2, %dl @@ -860,6 +1069,20 @@ ; ATOM-NEXT: movb %cl, (%rsi) ; ATOM-NEXT: retq ; +; ATHLON-LABEL: clamp_i8: +; ATHLON: ## %bb.0: +; ATHLON-NEXT: cmpl $127, %edi +; ATHLON-NEXT: movl $127, %eax +; ATHLON-NEXT: cmovlel %edi, %eax +; ATHLON-NEXT: cmpl $-128, %eax +; ATHLON-NEXT: movb $-128, %cl +; ATHLON-NEXT: jl LBB21_2 +; ATHLON-NEXT: ## %bb.1: +; ATHLON-NEXT: movl %eax, %ecx +; ATHLON-NEXT: LBB21_2: +; ATHLON-NEXT: movb %cl, (%rsi) +; ATHLON-NEXT: retq +; ; MCU-LABEL: clamp_i8: ; MCU: # %bb.0: ; MCU-NEXT: cmpl $127, %eax @@ -909,6 +1132,17 @@ ; ATOM-NEXT: movw %cx, (%rsi) ; ATOM-NEXT: retq ; +; ATHLON-LABEL: clamp: +; ATHLON: ## %bb.0: +; ATHLON-NEXT: cmpl $32767, %edi ## imm = 0x7FFF +; ATHLON-NEXT: movl $32767, %eax ## imm = 0x7FFF +; ATHLON-NEXT: cmovlel %edi, %eax +; ATHLON-NEXT: cmpl $-32768, %eax ## imm = 0x8000 +; ATHLON-NEXT: movl $32768, %ecx ## imm = 0x8000 +; ATHLON-NEXT: cmovgel %eax, %ecx +; ATHLON-NEXT: movw %cx, (%rsi) +; ATHLON-NEXT: retq +; ; MCU-LABEL: clamp: ; MCU: # %bb.0: ; MCU-NEXT: cmpl $32767, %eax # imm = 0x7FFF @@ -962,6 +1196,27 @@ ; CHECK-NEXT: ## %bb.4: ## %CF244 ; CHECK-NEXT: retq ; +; ATHLON-LABEL: test19: +; ATHLON: ## %bb.0: ## %BB +; ATHLON-NEXT: movl $-1, %eax +; ATHLON-NEXT: movb $1, %cl +; ATHLON-NEXT: .p2align 4, 0x90 +; ATHLON-NEXT: LBB23_1: ## %CF +; ATHLON-NEXT: ## =>This Inner Loop Header: Depth=1 +; ATHLON-NEXT: testb %cl, %cl +; ATHLON-NEXT: jne LBB23_1 +; ATHLON-NEXT: ## %bb.2: ## %CF250 +; ATHLON-NEXT: ## in Loop: Header=BB23_1 Depth=1 +; ATHLON-NEXT: jne LBB23_1 +; ATHLON-NEXT: .p2align 4, 0x90 +; ATHLON-NEXT: LBB23_3: ## %CF242 +; ATHLON-NEXT: ## =>This Inner Loop Header: Depth=1 +; ATHLON-NEXT: cmpl %eax, %eax +; ATHLON-NEXT: ucomiss %xmm0, %xmm0 +; ATHLON-NEXT: jp LBB23_3 +; ATHLON-NEXT: ## %bb.4: ## %CF244 +; ATHLON-NEXT: retq +; ; MCU-LABEL: test19: ; MCU: # %bb.0: # %BB ; MCU-NEXT: movl $-1, %ecx @@ -1022,6 +1277,15 @@ ; CHECK-NEXT: ## kill: def $ax killed $ax killed $eax ; CHECK-NEXT: retq ; +; ATHLON-LABEL: select_xor_1: +; ATHLON: ## %bb.0: ## %entry +; ATHLON-NEXT: movl %edi, %eax +; ATHLON-NEXT: xorl $43, %eax +; ATHLON-NEXT: testb $1, %sil +; ATHLON-NEXT: cmovel %edi, %eax +; ATHLON-NEXT: ## kill: def $ax killed $ax killed $eax +; ATHLON-NEXT: retq +; ; MCU-LABEL: select_xor_1: ; MCU: # %bb.0: # %entry ; MCU-NEXT: andl $1, %edx @@ -1050,6 +1314,15 @@ ; CHECK-NEXT: ## kill: def $ax killed $ax killed $eax ; CHECK-NEXT: retq ; +; ATHLON-LABEL: select_xor_1b: +; ATHLON: ## %bb.0: ## %entry +; ATHLON-NEXT: movl %edi, %eax +; ATHLON-NEXT: xorl $43, %eax +; ATHLON-NEXT: testb $1, %sil +; ATHLON-NEXT: cmovel %edi, %eax +; ATHLON-NEXT: ## kill: def $ax killed $ax killed $eax +; ATHLON-NEXT: retq +; ; MCU-LABEL: select_xor_1b: ; MCU: # %bb.0: # %entry ; MCU-NEXT: testb $1, %dl @@ -1076,6 +1349,14 @@ ; CHECK-NEXT: movl %esi, %eax ; CHECK-NEXT: retq ; +; ATHLON-LABEL: select_xor_2: +; ATHLON: ## %bb.0: ## %entry +; ATHLON-NEXT: xorl %edi, %esi +; ATHLON-NEXT: testb $1, %dl +; ATHLON-NEXT: cmovel %edi, %esi +; ATHLON-NEXT: movl %esi, %eax +; ATHLON-NEXT: retq +; ; MCU-LABEL: select_xor_2: ; MCU: # %bb.0: # %entry ; MCU-NEXT: andl $1, %ecx @@ -1102,6 +1383,14 @@ ; CHECK-NEXT: movl %esi, %eax ; CHECK-NEXT: retq ; +; ATHLON-LABEL: select_xor_2b: +; ATHLON: ## %bb.0: ## %entry +; ATHLON-NEXT: xorl %edi, %esi +; ATHLON-NEXT: testb $1, %dl +; ATHLON-NEXT: cmovel %edi, %esi +; ATHLON-NEXT: movl %esi, %eax +; ATHLON-NEXT: retq +; ; MCU-LABEL: select_xor_2b: ; MCU: # %bb.0: # %entry ; MCU-NEXT: testb $1, %cl @@ -1127,6 +1416,14 @@ ; CHECK-NEXT: movl %esi, %eax ; CHECK-NEXT: retq ; +; ATHLON-LABEL: select_or: +; ATHLON: ## %bb.0: ## %entry +; ATHLON-NEXT: orl %edi, %esi +; ATHLON-NEXT: testb $1, %dl +; ATHLON-NEXT: cmovel %edi, %esi +; ATHLON-NEXT: movl %esi, %eax +; ATHLON-NEXT: retq +; ; MCU-LABEL: select_or: ; MCU: # %bb.0: # %entry ; MCU-NEXT: andl $1, %ecx @@ -1153,6 +1450,14 @@ ; CHECK-NEXT: movl %esi, %eax ; CHECK-NEXT: retq ; +; ATHLON-LABEL: select_or_b: +; ATHLON: ## %bb.0: ## %entry +; ATHLON-NEXT: orl %edi, %esi +; ATHLON-NEXT: testb $1, %dl +; ATHLON-NEXT: cmovel %edi, %esi +; ATHLON-NEXT: movl %esi, %eax +; ATHLON-NEXT: retq +; ; MCU-LABEL: select_or_b: ; MCU: # %bb.0: # %entry ; MCU-NEXT: testb $1, %cl @@ -1178,6 +1483,14 @@ ; CHECK-NEXT: movl %esi, %eax ; CHECK-NEXT: retq ; +; ATHLON-LABEL: select_or_1: +; ATHLON: ## %bb.0: ## %entry +; ATHLON-NEXT: orl %edi, %esi +; ATHLON-NEXT: testb $1, %dl +; ATHLON-NEXT: cmovel %edi, %esi +; ATHLON-NEXT: movl %esi, %eax +; ATHLON-NEXT: retq +; ; MCU-LABEL: select_or_1: ; MCU: # %bb.0: # %entry ; MCU-NEXT: andl $1, %ecx @@ -1204,6 +1517,14 @@ ; CHECK-NEXT: movl %esi, %eax ; CHECK-NEXT: retq ; +; ATHLON-LABEL: select_or_1b: +; ATHLON: ## %bb.0: ## %entry +; ATHLON-NEXT: orl %edi, %esi +; ATHLON-NEXT: testb $1, %dl +; ATHLON-NEXT: cmovel %edi, %esi +; ATHLON-NEXT: movl %esi, %eax +; ATHLON-NEXT: retq +; ; MCU-LABEL: select_or_1b: ; MCU: # %bb.0: # %entry ; MCU-NEXT: testb $1, %cl