blob: 2f1166b64b59b65372928b5b0c401e0608e93e60 [file] [log] [blame]
Dan Gohmanda594cf2009-09-09 00:09:15 +00001; RUN: llc < %s -march=arm | \
Dan Gohman8c89a502007-08-15 13:36:28 +00002; RUN: grep strb | count 1
Dan Gohmanda594cf2009-09-09 00:09:15 +00003; RUN: llc < %s -march=arm | \
Dan Gohman8c89a502007-08-15 13:36:28 +00004; RUN: grep strh | count 1
Dan Gohmanf17a25c2007-07-18 16:29:46 +00005
Tanya Lattner246a1372008-02-17 20:02:20 +00006define void @test1(i32 %v, i16* %ptr) {
7 %tmp = trunc i32 %v to i16 ; <i16> [#uses=1]
8 store i16 %tmp, i16* %ptr
9 ret void
Dan Gohmanf17a25c2007-07-18 16:29:46 +000010}
11
Tanya Lattner246a1372008-02-17 20:02:20 +000012define void @test2(i32 %v, i8* %ptr) {
13 %tmp = trunc i32 %v to i8 ; <i8> [#uses=1]
14 store i8 %tmp, i8* %ptr
15 ret void
Dan Gohmanf17a25c2007-07-18 16:29:46 +000016}