brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 6c79b02 Raw
31 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 52; RUN: opt < %s -data-layout="e-p:32:32:32-p1:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-n8:16:32" -passes=gvn,dce -S | FileCheck %s --check-prefixes=CHECK,MDEP3; RUN: opt < %s -data-layout="e-p:32:32:32-p1:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-n8:16:32" -passes='gvn<memoryssa>',dce -S | FileCheck %s --check-prefixes=CHECK,MSSA4 5define i8 @coerce_offset0_addrspacecast(i32 %V, ptr %P) {6; MDEP-LABEL: define i8 @coerce_offset0_addrspacecast(7; MDEP-SAME: i32 [[V:%.*]], ptr [[P:%.*]]) {8; MDEP-NEXT:    store i32 [[V]], ptr [[P]], align 49; MDEP-NEXT:    [[TMP1:%.*]] = lshr i32 [[V]], 1610; MDEP-NEXT:    [[TMP2:%.*]] = trunc i32 [[TMP1]] to i811; MDEP-NEXT:    ret i8 [[TMP2]]12;13; MSSA-LABEL: define i8 @coerce_offset0_addrspacecast(14; MSSA-SAME: i32 [[V:%.*]], ptr [[P:%.*]]) {15; MSSA-NEXT:    store i32 [[V]], ptr [[P]], align 416; MSSA-NEXT:    [[P2:%.*]] = addrspacecast ptr [[P]] to ptr addrspace(1)17; MSSA-NEXT:    [[P3:%.*]] = getelementptr i8, ptr addrspace(1) [[P2]], i32 218; MSSA-NEXT:    [[A:%.*]] = load i8, ptr addrspace(1) [[P3]], align 119; MSSA-NEXT:    ret i8 [[A]]20;21  store i32 %V, ptr %P22 23  %P2 = addrspacecast ptr %P to ptr addrspace(1)24  %P3 = getelementptr i8, ptr addrspace(1) %P2, i32 225 26  %A = load i8, ptr addrspace(1) %P327  ret i8 %A28}29;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:30; CHECK: {{.*}}31