File: pr35761.ll

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (36 lines) | stat: -rw-r--r-- 1,080 bytes parent folder | download | duplicates (6)
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
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=x86_64-unknown-linux %s -o - | FileCheck %s

@x = dso_local global i8 0, align 1
@y = dso_local global i32 0, align 4
@z = dso_local global i24 0, align 4

define dso_local void @PR35761(i32 %call) {
; CHECK-LABEL: PR35761:
; CHECK:       # %bb.0: # %entry
; CHECK-NEXT:    movzbl x(%rip), %eax
; CHECK-NEXT:    andl $1, %eax
; CHECK-NEXT:    movzbl y(%rip), %ecx
; CHECK-NEXT:    xorl $255, %ecx
; CHECK-NEXT:    orl %eax, %ecx
; CHECK-NEXT:    movw %cx, z(%rip)
; CHECK-NEXT:    movb $0, z+2(%rip)
; CHECK-NEXT:    retq
entry:
  %0 = load i8, i8* @x, align 1
  %tobool = trunc i8 %0 to i1
  %conv = zext i1 %tobool to i32
  %or = or i32 32767, %call
  %neg = xor i32 %or, -1
  %neg1 = xor i32 %neg, -1
  %1 = load i32, i32* @y, align 4
  %xor = xor i32 %neg1, %1
  %or2 = or i32 %conv, %xor
  %conv3 = trunc i32 %or2 to i8
  %bf.load = load i24, i24* @z, align 4
  %2 = zext i8 %conv3 to i24
  %bf.value = and i24 %2, 4194303
  store i24 %bf.value, i24* @z, align 2
  ret void
}