From: Chris Lattner Date: Tue, 10 Sep 2002 23:03:10 +0000 (+0000) Subject: Check for cannonicalization of shl X, 1 -> add X, X X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=dabb94adc15566aaf11b4befa18be55dbecfa9b0;p=oota-llvm.git Check for cannonicalization of shl X, 1 -> add X, X git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3670 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Transforms/InstCombine/shift.ll b/test/Transforms/InstCombine/shift.ll index dde01f56586..c6a341f454f 100644 --- a/test/Transforms/InstCombine/shift.ll +++ b/test/Transforms/InstCombine/shift.ll @@ -33,3 +33,7 @@ uint "test5"(uint %A) { ret uint %B } +uint %test6(uint %A) { + %B = shl uint %A, ubyte 1 ;; convert to an add instruction + ret uint %B +}