File: select-zero-one.ll

package info (click to toggle)
llvm 2.6-9.1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 57,604 kB
  • ctags: 44,336
  • sloc: cpp: 344,766; sh: 12,407; ansic: 10,617; ada: 3,070; ml: 2,505; perl: 2,496; makefile: 1,426; pascal: 1,163; exp: 389; asm: 307; python: 298; objc: 260; lisp: 182; csh: 117; xml: 38; f90: 36; tcl: 20
file content (25 lines) | stat: -rw-r--r-- 872 bytes parent folder | download | duplicates (2)
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
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not grep cmov
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not grep xor
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movzbl | count 1

@r1 = weak global i32 0

define void @t1(i32 %a, double %b) {
  %tmp114 = fcmp ugt double %b, 1.000000e-09
  %tmp120 = icmp eq i32 %a, 0		; <i1> [#uses=1]
  %bothcond = or i1 %tmp114, %tmp120		; <i1> [#uses=1]
  %storemerge = select i1 %bothcond, i32 0, i32 1		; <i32> [#uses=2]
  store i32 %storemerge, i32* @r1, align 4
  ret void
}

@r2 = weak global i8 0

define void @t2(i32 %a, double %b) {
  %tmp114 = fcmp ugt double %b, 1.000000e-09
  %tmp120 = icmp eq i32 %a, 0		; <i1> [#uses=1]
  %bothcond = or i1 %tmp114, %tmp120		; <i1> [#uses=1]
  %storemerge = select i1 %bothcond, i8 0, i8 1		; <i32> [#uses=2]
  store i8 %storemerge, i8* @r2, align 4
  ret void
}