blob: e8da787d27fc5396a64f7b4076a0a6b59d0f6c58 [file] [log] [blame]
Tanya Lattnerf28e0ce2008-02-19 01:41:04 +00001; RUN: llvm-as < %s | llc -march=c
2@y = weak global i8 0 ; <i8*> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003
Tanya Lattnerf28e0ce2008-02-19 01:41:04 +00004define i32 @testcaseshr() {
Dan Gohmanf17a25c2007-07-18 16:29:46 +00005entry:
Tanya Lattnerf28e0ce2008-02-19 01:41:04 +00006 ret i32 lshr (i32 ptrtoint (i8* @y to i32), i32 4)
Dan Gohmanf17a25c2007-07-18 16:29:46 +00007}
Tanya Lattnerf28e0ce2008-02-19 01:41:04 +00008
9define i32 @testcaseshl() {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000010entry:
Tanya Lattnerf28e0ce2008-02-19 01:41:04 +000011 ret i32 shl (i32 ptrtoint (i8* @y to i32), i32 4)
Dan Gohmanf17a25c2007-07-18 16:29:46 +000012}
Tanya Lattnerf28e0ce2008-02-19 01:41:04 +000013