blob: 4662628b672e2e05bbc1036b4c00b8fe0dab6ffa [file] [log] [blame]
Tanya Lattner632e88a2008-02-21 07:42:26 +00001; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | \
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002; RUN: grep {shld.*CL}
Tanya Lattner632e88a2008-02-21 07:42:26 +00003; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | \
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004; RUN: not grep {mov CL, BL}
5
6; PR687
7
Tanya Lattner632e88a2008-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
Dan Gohmanf17a25c2007-07-18 16:29:46 +000014}
Tanya Lattner632e88a2008-02-21 07:42:26 +000015