blob: d38f9a88fcd6c893d86fc6f37d3b6dc49067816b [file] [log] [blame]
Dan Gohman0a063102009-09-08 23:54:48 +00001; RUN: llc < %s -march=x86 -x86-asm-syntax=intel | \
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002; RUN: grep {shld.*CL}
Dan Gohman0a063102009-09-08 23:54:48 +00003; RUN: llc < %s -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