blob: 4662628b672e2e05bbc1036b4c00b8fe0dab6ffa [file] [log] [blame]
Tanya Lattner33eefff2008-02-21 07:42:26 +00001; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | \
Reid Spencerd3b1f6d2007-04-15 22:20:47 +00002; RUN: grep {shld.*CL}
Tanya Lattner33eefff2008-02-21 07:42:26 +00003; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | \
Reid Spencerd3b1f6d2007-04-15 22:20:47 +00004; RUN: not grep {mov CL, BL}
Chris Lattner734d8112006-08-29 23:09:59 +00005
6; PR687
7
Tanya Lattner33eefff2008-02-21 07:42:26 +00008define i64 @foo(i64 %x, i64* %X) {
9 %tmp.1 = load i64* %X ; <i64> [#uses=1]
10 %tmp.3 = trunc i64 %tmp.1 to i8 ; <i8> [#uses=1]
11 %shift.upgrd.1 = zext i8 %tmp.3 to i64 ; <i64> [#uses=1]
12 %tmp.4 = shl i64 %x, %shift.upgrd.1 ; <i64> [#uses=1]
13 ret i64 %tmp.4
Chris Lattner734d8112006-08-29 23:09:59 +000014}
Tanya Lattner33eefff2008-02-21 07:42:26 +000015