86 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 22; RUN: llc < %s -mtriple=m68k-linux -verify-machineinstrs | FileCheck %s3 4@0 = external constant <{ [32 x i8] }>5 6define i32 @"test_zext_pcd_i8_to_i32"() {7; CHECK-LABEL: test_zext_pcd_i8_to_i32:8; CHECK: .cfi_startproc9; CHECK-NEXT: ; %bb.0:10; CHECK-NEXT: move.b (__unnamed_1+16,%pc), %d011; CHECK-NEXT: and.l #255, %d012; CHECK-NEXT: rts13 %p = getelementptr inbounds i8, ptr @0, i32 1614 %val = load i8, ptr %p15 %val2 = zext i8 %val to i3216 ret i32 %val217}18 19define i16 @"test_zext_pcd_i8_to_i16"() {20; CHECK-LABEL: test_zext_pcd_i8_to_i16:21; CHECK: .cfi_startproc22; CHECK-NEXT: ; %bb.0:23; CHECK-NEXT: move.b (__unnamed_1+16,%pc), %d024; CHECK-NEXT: and.w #255, %d025; CHECK-NEXT: rts26 %p = getelementptr inbounds i8, ptr @0, i32 1627 %val = load i8, ptr %p28 %val2 = zext i8 %val to i1629 ret i16 %val230}31 32define i32 @"test_zext_pcd_i16_to_i32"() {33; CHECK-LABEL: test_zext_pcd_i16_to_i32:34; CHECK: .cfi_startproc35; CHECK-NEXT: ; %bb.0:36; CHECK-NEXT: move.w (__unnamed_1+16,%pc), %d037; CHECK-NEXT: and.l #65535, %d038; CHECK-NEXT: rts39 %p = getelementptr inbounds i16, ptr @0, i32 840 %val = load i16, ptr %p41 %val2 = zext i16 %val to i3242 ret i32 %val243}44 45define i16 @test_anyext_pcd_i8_to_i16() nounwind {46; CHECK-LABEL: test_anyext_pcd_i8_to_i16:47; CHECK: ; %bb.0:48; CHECK-NEXT: move.b (__unnamed_1+4,%pc), %d049; CHECK-NEXT: and.l #255, %d050; CHECK-NEXT: lsl.w #8, %d051; CHECK-NEXT: ; kill: def $wd0 killed $wd0 killed $d052; CHECK-NEXT: rts53 %copyload = load i8, ptr getelementptr inbounds nuw (i8, ptr @0, i32 4)54 %insert_ext = zext i8 %copyload to i1655 %insert_shift = shl i16 %insert_ext, 856 ret i16 %insert_shift57}58 59define i32 @test_anyext_pcd_i8_to_i32() nounwind {60; CHECK-LABEL: test_anyext_pcd_i8_to_i32:61; CHECK: ; %bb.0:62; CHECK-NEXT: moveq #24, %d163; CHECK-NEXT: move.b (__unnamed_1+4,%pc), %d064; CHECK-NEXT: and.l #255, %d065; CHECK-NEXT: lsl.l %d1, %d066; CHECK-NEXT: rts67 %copyload = load i8, ptr getelementptr inbounds nuw (i8, ptr @0, i32 4)68 %insert_ext = zext i8 %copyload to i3269 %insert_shift = shl i32 %insert_ext, 2470 ret i32 %insert_shift71}72 73define i32 @test_anyext_pcd_i16_to_i32() nounwind {74; CHECK-LABEL: test_anyext_pcd_i16_to_i32:75; CHECK: ; %bb.0:76; CHECK-NEXT: moveq #16, %d177; CHECK-NEXT: move.w (__unnamed_1+4,%pc), %d078; CHECK-NEXT: and.l #65535, %d079; CHECK-NEXT: lsl.l %d1, %d080; CHECK-NEXT: rts81 %copyload = load i16, ptr getelementptr inbounds nuw (i8, ptr @0, i32 4)82 %insert_ext = zext i16 %copyload to i3283 %insert_shift = shl i32 %insert_ext, 1684 ret i32 %insert_shift85}86