diff options
Diffstat (limited to 'llvm/test/CodeGen/X86/select.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/select.ll | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/llvm/test/CodeGen/X86/select.ll b/llvm/test/CodeGen/X86/select.ll index 99c4a99b6ed..558dc7db42d 100644 --- a/llvm/test/CodeGen/X86/select.ll +++ b/llvm/test/CodeGen/X86/select.ll @@ -1088,14 +1088,25 @@ define i8 @test18(i32 %x, i8 zeroext %a, i8 zeroext %b) nounwind { } define i32 @trunc_select_miscompile(i32 %a, i1 zeroext %cc) { -; CHECK-LABEL: trunc_select_miscompile: -; CHECK: ## %bb.0: -; CHECK-NEXT: movl %esi, %ecx -; CHECK-NEXT: movl %edi, %eax -; CHECK-NEXT: orb $2, %cl -; CHECK-NEXT: ## kill: def $cl killed $cl killed $ecx -; CHECK-NEXT: shll %cl, %eax -; CHECK-NEXT: retq +; GENERIC-LABEL: trunc_select_miscompile: +; GENERIC: ## %bb.0: +; GENERIC-NEXT: ## kill: def $esi killed $esi def $rsi +; GENERIC-NEXT: movl %edi, %eax +; GENERIC-NEXT: leal 2(%rsi), %ecx +; GENERIC-NEXT: ## kill: def $cl killed $cl killed $ecx +; GENERIC-NEXT: shll %cl, %eax +; GENERIC-NEXT: retq +; +; ATOM-LABEL: trunc_select_miscompile: +; ATOM: ## %bb.0: +; ATOM-NEXT: ## kill: def $esi killed $esi def $rsi +; ATOM-NEXT: leal 2(%rsi), %ecx +; ATOM-NEXT: movl %edi, %eax +; ATOM-NEXT: ## kill: def $cl killed $cl killed $ecx +; ATOM-NEXT: shll %cl, %eax +; ATOM-NEXT: nop +; ATOM-NEXT: nop +; ATOM-NEXT: retq ; ; ATHLON-LABEL: trunc_select_miscompile: ; ATHLON: ## %bb.0: |