1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=x86_64-unknown-linux %s -o - | FileCheck %s
4 @x = dso_local global i8 0, align 1
5 @y = dso_local global i32 0, align 4
6 @z = dso_local global i24 0, align 4
8 define dso_local void @PR35761(i32 %call) {
9 ; CHECK-LABEL: PR35761:
10 ; CHECK: # %bb.0: # %entry
11 ; CHECK-NEXT: movzbl x(%rip), %eax
12 ; CHECK-NEXT: andl $1, %eax
13 ; CHECK-NEXT: movzbl y(%rip), %ecx
14 ; CHECK-NEXT: xorl $255, %ecx
15 ; CHECK-NEXT: orl %eax, %ecx
16 ; CHECK-NEXT: movw %cx, z(%rip)
17 ; CHECK-NEXT: movb $0, z+2(%rip)
20 %0 = load i8, ptr @x, align 1
21 %tobool = trunc i8 %0 to i1
22 %conv = zext i1 %tobool to i32
23 %or = or i32 32767, %call
24 %neg = xor i32 %or, -1
25 %neg1 = xor i32 %neg, -1
26 %1 = load i32, ptr @y, align 4
27 %xor = xor i32 %neg1, %1
28 %or2 = or i32 %conv, %xor
29 %conv3 = trunc i32 %or2 to i8
30 %bf.load = load i24, ptr @z, align 4
31 %2 = zext i8 %conv3 to i24
32 %bf.value = and i24 %2, 4194303
33 store i24 %bf.value, ptr @z, align 2