1 ; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s 2 3 ; CHECK: @foo 4 ; CHECK: shl 5 define <4 x i32> @foo(<4 x i32> %a, <4 x i32> %b) nounwind { 6 entry: 7 %cmp = shl <4 x i32> %a, %b ; <4 x i32> [#uses=1] 8 ret <4 x i32> %cmp 9 } 10 11 ; CHECK: @bar 12 ; CHECK: lshr 13 define <4 x i32> @bar(<4 x i32> %a, <4 x i32> %b) nounwind { 14 entry: 15 %cmp = lshr <4 x i32> %a, %b ; <4 x i32> [#uses=1] 16 ret <4 x i32> %cmp 17 } 18 19 ; CHECK: @baz 20 ; CHECK: ashr 21 define <4 x i32> @baz(<4 x i32> %a, <4 x i32> %b) nounwind { 22 entry: 23 %cmp = ashr <4 x i32> %a, %b ; <4 x i32> [#uses=1] 24 ret <4 x i32> %cmp 25 } 26 27 ; Constant expressions: these should be folded. 28 29 ; CHECK: @foo_ce 30 ; CHECK: ret <2 x i64> <i64 40, i64 192> 31 define <2 x i64> @foo_ce() nounwind { 32 ret <2 x i64> shl (<2 x i64> <i64 5, i64 6>, <2 x i64> <i64 3, i64 5>) 33 } 34 35 ; CHECK: @bar_ce 36 ; CHECK: ret <2 x i64> <i64 42, i64 11> 37 define <2 x i64> @bar_ce() nounwind { 38 ret <2 x i64> lshr (<2 x i64> <i64 340, i64 380>, <2 x i64> <i64 3, i64 5>) 39 } 40 41 ; CHECK: baz_ce 42 ; CHECK: ret <2 x i64> <i64 71, i64 12> 43 define <2 x i64> @baz_ce() nounwind { 44 ret <2 x i64> ashr (<2 x i64> <i64 573, i64 411>, <2 x i64> <i64 3, i64 5>) 45 } 46