1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00
llvm-mirror/test/CodeGen/X86/zext-inreg-1.ll
Dávid Bolvanský abfb9e7ee2 [Codegen][X86] Modernize/regenerate old tests. NFCI.
Summary:
Switch to FileCheck where possible.
Adjust tests so they can be easily regenerated by update scripts.

Reviewers: craig.topper, spatel, RKSimon

Reviewed By: spatel

Subscribers: MatzeB, qcolombet, arphaman, jfb, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71211
2019-12-10 00:27:46 +01:00

36 lines
1.1 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=i686-- | FileCheck %s
; These tests differ from the ones in zext-inreg-0.ll in that
; on x86-64 they do require and instructions.
; These should use movzbl instead of 'and 255'.
; This related to not having ZERO_EXTEND_REG node.
define i64 @l(i64 %d) nounwind {
; CHECK-LABEL: l:
; CHECK: # %bb.0:
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %ecx
; CHECK-NEXT: addl $1, %eax
; CHECK-NEXT: adcl $0, %ecx
; CHECK-NEXT: movzbl %cl, %edx
; CHECK-NEXT: retl
%e = add i64 %d, 1
%retval = and i64 %e, 1099511627775
ret i64 %retval
}
define i64 @m(i64 %d) nounwind {
; CHECK-LABEL: m:
; CHECK: # %bb.0:
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %ecx
; CHECK-NEXT: addl $1, %eax
; CHECK-NEXT: adcl $0, %ecx
; CHECK-NEXT: movzwl %cx, %edx
; CHECK-NEXT: retl
%e = add i64 %d, 1
%retval = and i64 %e, 281474976710655
ret i64 %retval
}