File: pr33844.ll

package info (click to toggle)
llvm-toolchain-7 1%3A7.0.1-8%2Bdeb10u2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 734,616 kB
  • sloc: cpp: 3,776,926; ansic: 633,271; asm: 350,301; python: 142,716; objc: 107,612; sh: 22,626; lisp: 11,056; perl: 7,999; pascal: 6,742; ml: 5,537; awk: 3,536; makefile: 2,557; cs: 2,027; xml: 841; javascript: 518; ruby: 156
file content (38 lines) | stat: -rw-r--r-- 1,193 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -o - %s | FileCheck %s

target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@global = external global i32
@global.1 = external global i64

define void @patatino() {
; CHECK-LABEL: patatino:
; CHECK:       # %bb.0: # %bb
; CHECK-NEXT:    movl {{.*}}(%rip), %eax
; CHECK-NEXT:    movl %eax, %ecx
; CHECK-NEXT:    shrl $31, %ecx
; CHECK-NEXT:    addl $2147483647, %ecx # imm = 0x7FFFFFFF
; CHECK-NEXT:    shrl $31, %ecx
; CHECK-NEXT:    andl $-2, %ecx
; CHECK-NEXT:    andl $-536870912, %eax # imm = 0xE0000000
; CHECK-NEXT:    orl %ecx, %eax
; CHECK-NEXT:    movl %eax, {{.*}}(%rip)
; CHECK-NEXT:    retq
bb:
  %tmp = load i32, i32* @global
  %tmp1 = lshr i32 %tmp, 31
  %tmp2 = add nuw nsw i32 %tmp1, 2147483647
  %tmp3 = load i64, i64* @global.1
  %tmp4 = shl i64 %tmp3, 23
  %tmp5 = add nsw i64 %tmp4, 8388639
  %tmp6 = trunc i64 %tmp5 to i32
  %tmp7 = lshr i32 %tmp2, %tmp6
  %tmp8 = load i32, i32* @global
  %tmp9 = and i32 %tmp7, 62
  %tmp10 = and i32 %tmp8, -536870912
  %tmp11 = or i32 %tmp9, %tmp10
  store i32 %tmp11, i32* @global
  ret void
}