brintos

brintos / llvm-project-archived public Read only

0
0
Text · 903 B · b629687 Raw
20 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 32; RUN: opt -S -passes='require<profile-summary>,function(codegenprepare)' -mtriple=x86_64-unknown-unknown < %s | FileCheck %s3 4; Make sure the nneg flag is dropped when lshr and zext are interchanged.5define i8 @get(ptr %box, i32 %in) {6; CHECK-LABEL: define i8 @get(7; CHECK-SAME: ptr [[BOX:%.*]], i32 [[IN:%.*]]) {8; CHECK-NEXT:    [[PROMOTED:%.*]] = zext i32 [[IN]] to i649; CHECK-NEXT:    [[SHR:%.*]] = lshr i64 [[PROMOTED]], 2410; CHECK-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i8, ptr [[BOX]], i64 [[SHR]]11; CHECK-NEXT:    [[RES:%.*]] = load i8, ptr [[ARRAYIDX]], align 112; CHECK-NEXT:    ret i8 [[RES]]13;14  %shr = lshr i32 %in, 2415  %idxprom = zext nneg i32 %shr to i6416  %arrayidx = getelementptr inbounds i8, ptr %box, i64 %idxprom17  %res = load i8, ptr %arrayidx, align 118  ret i8 %res19}20