File: narrow_op-2.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 (23 lines) | stat: -rw-r--r-- 724 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
; RUN: llvm-as < %s | llc -march=x86-64 | grep andb | count 2
; RUN: llvm-as < %s | llc -march=x86-64 | grep andb | grep 254
; RUN: llvm-as < %s | llc -march=x86-64 | grep andb | grep 253

	%struct.bf = type { i64, i16, i16, i32 }
@bfi = external global %struct.bf*

define void @t1() nounwind ssp {
entry:
	%0 = load %struct.bf** @bfi, align 8
	%1 = getelementptr %struct.bf* %0, i64 0, i32 1
	%2 = bitcast i16* %1 to i32*
	%3 = load i32* %2, align 1
	%4 = and i32 %3, -65537
	store i32 %4, i32* %2, align 1
	%5 = load %struct.bf** @bfi, align 8
	%6 = getelementptr %struct.bf* %5, i64 0, i32 1
	%7 = bitcast i16* %6 to i32*
	%8 = load i32* %7, align 1
	%9 = and i32 %8, -131073
	store i32 %9, i32* %7, align 1
	ret void
}