blob: d00326ebc7c638f9fe1367f0d6aba2e406edaf3d [file] [log] [blame]
Chris Lattner7dd8b052005-09-02 00:13:56 +00001; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'extsh\|rlwinm'
Chris Lattnerc7307062005-08-31 18:19:50 +00002
3int %test1(short %X) {
4 %Y = cast short %X to int ;; dead
5 ret int %Y
6}
7
8int %test2(ushort %X) {
9 %Y = cast ushort %X to int
10 %Z = and int %Y, 65535 ;; dead
11 ret int %Z
12}
Chris Lattner9832ce02005-09-01 23:43:58 +000013
14void %test3() {
15 %tmp.0 = call short %foo() ;; no extsh!
16 %tmp.1 = setlt short %tmp.0, 1234
17 br bool %tmp.1, label %then, label %UnifiedReturnBlock
18
19then:
20 call int %test1(short 0)
21 ret void
22UnifiedReturnBlock:
23 ret void
24}
25
26declare short %foo()