blob: aa141d20cf940f991ebb040e85a016e87f655305 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | \
Dan Gohman8c89a502007-08-15 13:36:28 +00002; RUN: grep shld | count 1
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003;
4; Check that the isel does not fold the shld, which already folds a load
5; and has two uses, into a store.
6%A = external global uint
7
8uint %test5(uint %B, ubyte %C) {
9 %tmp.1 = load uint *%A;
10 %tmp.2 = shl uint %tmp.1, ubyte %C
11 %tmp.3 = sub ubyte 32, %C
12 %tmp.4 = shr uint %B, ubyte %tmp.3
13 %tmp.5 = or uint %tmp.4, %tmp.2
14 store uint %tmp.5, uint* %A
15 ret uint %tmp.5
16}