53 lines · plain
1; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep "extsh\|rlwinm"2 3declare signext i16 @foo() 4 5define i32 @test1(i16 signext %X) {6 %Y = sext i16 %X to i32 ;; dead7 ret i32 %Y8}9 10define i32 @test2(i16 zeroext %X) {11 %Y = sext i16 %X to i3212 %Z = and i32 %Y, 65535 ;; dead13 ret i32 %Z14}15 16define void @test3() {17 %tmp.0 = call signext i16 @foo() ;; no extsh!18 %tmp.1 = icmp slt i16 %tmp.0, 123419 br i1 %tmp.1, label %then, label %UnifiedReturnBlock20 21then: 22 call i32 @test1(i16 signext 0)23 ret void24UnifiedReturnBlock:25 ret void26}27 28define i32 @test4(ptr %P) {29 %tmp.1 = load i16, ptr %P30 %tmp.2 = zext i16 %tmp.1 to i3231 %tmp.3 = and i32 %tmp.2, 25532 ret i32 %tmp.333}34 35define i32 @test5(ptr %P) {36 %tmp.1 = load i16, ptr %P37 %tmp.2 = bitcast i16 %tmp.1 to i1638 %tmp.3 = zext i16 %tmp.2 to i3239 %tmp.4 = and i32 %tmp.3, 25540 ret i32 %tmp.441}42 43define i32 @test6(ptr %P) {44 %tmp.1 = load i32, ptr %P45 %tmp.2 = and i32 %tmp.1, 25546 ret i32 %tmp.247}48 49define zeroext i16 @test7(float %a) {50 %tmp.1 = fptoui float %a to i1651 ret i16 %tmp.152}53