brintos

brintos / llvm-project-archived public Read only

0
0
Text · 900 B · 576125b Raw
31 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 22; RUN: opt < %s -passes=instcombine -S | FileCheck %s3 4target datalayout = "n8:16:32:64"5 6define i32 @trunc_shl_zext_32(i32 %a) {7; CHECK-LABEL: define i32 @trunc_shl_zext_328; CHECK-SAME: (i32 [[A:%.*]]) {9; CHECK-NEXT:    [[SHL:%.*]] = shl i32 [[A]], 410; CHECK-NEXT:    [[EXT:%.*]] = and i32 [[SHL]], 6552011; CHECK-NEXT:    ret i32 [[EXT]]12;13  %trunc = trunc i32 %a to i1614  %shl = shl i16 %trunc, 415  %ext = zext i16 %shl to i3216  ret i32 %ext17}18 19define i64 @trunc_shl_zext_64(i64 %a) {20; CHECK-LABEL: define i64 @trunc_shl_zext_6421; CHECK-SAME: (i64 [[A:%.*]]) {22; CHECK-NEXT:    [[SHL:%.*]] = shl i64 [[A]], 723; CHECK-NEXT:    [[EXT:%.*]] = and i64 [[SHL]], 12824; CHECK-NEXT:    ret i64 [[EXT]]25;26  %trunc = trunc i64 %a to i827  %shl = shl i8 %trunc, 728  %ext = zext i8 %shl to i6429  ret i64 %ext30}31