File: or-scalar.ll

package info (click to toggle)
llvm-toolchain-13 1%3A13.0.1-11
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,418,840 kB
  • sloc: cpp: 5,290,826; ansic: 996,570; asm: 544,593; python: 188,212; objc: 72,027; lisp: 30,291; f90: 25,395; sh: 24,898; javascript: 9,780; pascal: 9,398; perl: 7,484; ml: 5,432; awk: 3,523; makefile: 2,913; xml: 953; cs: 573; fortran: 539
file content (60 lines) | stat: -rw-r--r-- 1,545 bytes parent folder | download | duplicates (16)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=x86_64-linux-gnu -global-isel -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=ALL

define i32 @test_or_i1(i32 %arg1, i32 %arg2) {
; ALL-LABEL: test_or_i1:
; ALL:       # %bb.0:
; ALL-NEXT:    cmpl %esi, %edi
; ALL-NEXT:    sete %al
; ALL-NEXT:    orb %al, %al
; ALL-NEXT:    movzbl %al, %eax
; ALL-NEXT:    andl $1, %eax
; ALL-NEXT:    retq
  %c = icmp eq i32 %arg1, %arg2
  %x = or i1 %c , %c
  %ret = zext i1 %x to i32
  ret i32 %ret
}

define i8 @test_or_i8(i8 %arg1, i8 %arg2) {
; ALL-LABEL: test_or_i8:
; ALL:       # %bb.0:
; ALL-NEXT:    movl %esi, %eax
; ALL-NEXT:    orb %dil, %al
; ALL-NEXT:    # kill: def $al killed $al killed $eax
; ALL-NEXT:    retq
  %ret = or i8 %arg1, %arg2
  ret i8 %ret
}

define i16 @test_or_i16(i16 %arg1, i16 %arg2) {
; ALL-LABEL: test_or_i16:
; ALL:       # %bb.0:
; ALL-NEXT:    movl %esi, %eax
; ALL-NEXT:    orw %di, %ax
; ALL-NEXT:    # kill: def $ax killed $ax killed $eax
; ALL-NEXT:    retq
  %ret = or i16 %arg1, %arg2
  ret i16 %ret
}

define i32 @test_or_i32(i32 %arg1, i32 %arg2) {
; ALL-LABEL: test_or_i32:
; ALL:       # %bb.0:
; ALL-NEXT:    movl %esi, %eax
; ALL-NEXT:    orl %edi, %eax
; ALL-NEXT:    retq
  %ret = or i32 %arg1, %arg2
  ret i32 %ret
}

define i64 @test_or_i64(i64 %arg1, i64 %arg2) {
; ALL-LABEL: test_or_i64:
; ALL:       # %bb.0:
; ALL-NEXT:    movq %rsi, %rax
; ALL-NEXT:    orq %rdi, %rax
; ALL-NEXT:    retq
  %ret = or i64 %arg1, %arg2
  ret i64 %ret
}