2016-02-21 01:56:45 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
2016-04-27 07:36:38 +08:00
|
|
|
; RUN: llc < %s -mtriple=i686-pc-linux | FileCheck %s
|
2013-06-22 02:45:27 +08:00
|
|
|
|
|
|
|
define i64 @foo(i32 %sum) {
|
2016-02-21 01:56:45 +08:00
|
|
|
; CHECK-LABEL: foo:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: # %bb.0: # %entry
|
2016-02-21 01:56:45 +08:00
|
|
|
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
|
|
|
|
; CHECK-NEXT: shrl $2, %eax
|
2016-05-28 22:58:37 +08:00
|
|
|
; CHECK-NEXT: orl $-67108864, %eax # imm = 0xFC000000
|
2016-02-21 01:56:45 +08:00
|
|
|
; CHECK-NEXT: movl $1073741823, %edx # imm = 0x3FFFFFFF
|
|
|
|
; CHECK-NEXT: retl
|
2013-06-22 02:45:27 +08:00
|
|
|
entry:
|
|
|
|
%conv = sext i32 %sum to i64
|
|
|
|
%shr = lshr i64 %conv, 2
|
|
|
|
%or = or i64 4611686018360279040, %shr
|
|
|
|
ret i64 %or
|
|
|
|
}
|