1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-01 00:12:50 +01:00
llvm-mirror/test/CodeGen/X86/h-registers-1.ll
Chandler Carruth 8a358b3669 Convert all tests using TCL-style quoting to use shell-style quoting.
This was done through the aid of a terrible Perl creation. I will not
paste any of the horrors here. Suffice to say, it require multiple
staged rounds of replacements, state carried between, and a few
nested-construct-parsing hacks that I'm not proud of. It happens, by
luck, to be able to deal with all the TCL-quoting patterns in evidence
in the LLVM test suite.

If anyone is maintaining large out-of-tree test trees, feel free to poke
me and I'll send you the steps I used to convert things, as well as
answer any painful questions etc. IRC works best for this type of thing
I find.

Once converted, switch the LLVM lit config to use ShTests the same as
Clang. In addition to being able to delete large amounts of Python code
from 'lit', this will also simplify the entire test suite and some of
lit's architecture.

Finally, the test suite runs 33% faster on Linux now. ;]
For my 16-hardware-thread (2x 4-core xeon e5520): 36s -> 24s

llvm-svn: 159525
2012-07-02 12:47:22 +00:00

40 lines
1020 B
LLVM

; RUN: llc < %s -mtriple=x86_64-linux > %t
; RUN: grep "movzbl %[abcd]h," %t | count 8
; RUN: grep "%[abcd]h" %t | not grep "%r[[:digit:]]*d"
; LLVM creates virtual registers for values live across blocks
; based on the type of the value. Make sure that the extracts
; here use the GR64_NOREX register class for their result,
; instead of plain GR64.
define i64 @foo(i64 %a, i64 %b, i64 %c, i64 %d,
i64 %e, i64 %f, i64 %g, i64 %h) {
%sa = lshr i64 %a, 8
%A = and i64 %sa, 255
%sb = lshr i64 %b, 8
%B = and i64 %sb, 255
%sc = lshr i64 %c, 8
%C = and i64 %sc, 255
%sd = lshr i64 %d, 8
%D = and i64 %sd, 255
%se = lshr i64 %e, 8
%E = and i64 %se, 255
%sf = lshr i64 %f, 8
%F = and i64 %sf, 255
%sg = lshr i64 %g, 8
%G = and i64 %sg, 255
%sh = lshr i64 %h, 8
%H = and i64 %sh, 255
br label %next
next:
%u = add i64 %A, %B
%v = add i64 %C, %D
%w = add i64 %E, %F
%x = add i64 %G, %H
%y = add i64 %u, %v
%z = add i64 %w, %x
%t = add i64 %y, %z
ret i64 %t
}