brintos

brintos / llvm-project-archived public Read only

0
0
Text · 13.8 KiB · c3bdf06 Raw
342 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 52; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -passes=amdgpu-simplifylib %s | FileCheck %s3 4; Make sure we can produce a valid FunctionType for the expected5; signature of image functions.6 7define i32 @test_get_image_width_ro_image1d_t(ptr addrspace(4) readnone %img) {8; CHECK-LABEL: define i32 @test_get_image_width_ro_image1d_t(9; CHECK-SAME: ptr addrspace(4) readnone [[IMG:%.*]]) {10; CHECK-NEXT:  [[ENTRY:.*:]]11; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 @_Z15get_image_width14ocl_image1d_ro(ptr addrspace(4) [[IMG]])12; CHECK-NEXT:    ret i32 [[CALL]]13;14entry:15  %call = tail call i32 @_Z15get_image_width14ocl_image1d_ro(ptr addrspace(4) %img)16  ret i32 %call17}18 19declare i32 @_Z15get_image_width14ocl_image1d_ro(ptr addrspace(4)) #120 21define i32 @test_get_image_width_wo_image1d_t(ptr addrspace(4) readnone %img) {22; CHECK-LABEL: define i32 @test_get_image_width_wo_image1d_t(23; CHECK-SAME: ptr addrspace(4) readnone [[IMG:%.*]]) {24; CHECK-NEXT:  [[ENTRY:.*:]]25; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 @_Z15get_image_width14ocl_image1d_wo(ptr addrspace(4) [[IMG]])26; CHECK-NEXT:    ret i32 [[CALL]]27;28entry:29  %call = tail call i32 @_Z15get_image_width14ocl_image1d_wo(ptr addrspace(4) %img)30  ret i32 %call31}32 33declare i32 @_Z15get_image_width14ocl_image1d_wo(ptr addrspace(4)) #134 35define i32 @test_get_image_width_rw_image1d_t(ptr addrspace(4) readnone %img) {36; CHECK-LABEL: define i32 @test_get_image_width_rw_image1d_t(37; CHECK-SAME: ptr addrspace(4) readnone [[IMG:%.*]]) {38; CHECK-NEXT:  [[ENTRY:.*:]]39; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 @_Z15get_image_width14ocl_image1d_rw(ptr addrspace(4) [[IMG]])40; CHECK-NEXT:    ret i32 [[CALL]]41;42entry:43  %call = tail call i32 @_Z15get_image_width14ocl_image1d_rw(ptr addrspace(4) %img)44  ret i32 %call45}46 47declare i32 @_Z15get_image_width14ocl_image1d_rw(ptr addrspace(4)) #148 49define i32 @test_get_image_width_ro_image1d_buffer_t(ptr addrspace(4) readnone %img) {50; CHECK-LABEL: define i32 @test_get_image_width_ro_image1d_buffer_t(51; CHECK-SAME: ptr addrspace(4) readnone [[IMG:%.*]]) {52; CHECK-NEXT:  [[ENTRY:.*:]]53; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 @_Z15get_image_width21ocl_image1d_buffer_ro(ptr addrspace(4) [[IMG]])54; CHECK-NEXT:    ret i32 [[CALL]]55;56entry:57  %call = tail call i32 @_Z15get_image_width21ocl_image1d_buffer_ro(ptr addrspace(4) %img)58  ret i32 %call59}60 61declare i32 @_Z15get_image_width21ocl_image1d_buffer_ro(ptr addrspace(4)) #162 63define i32 @test_get_image_width_wo_image1d_buffer_t(ptr addrspace(4) readnone %img) {64; CHECK-LABEL: define i32 @test_get_image_width_wo_image1d_buffer_t(65; CHECK-SAME: ptr addrspace(4) readnone [[IMG:%.*]]) {66; CHECK-NEXT:  [[ENTRY:.*:]]67; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 @_Z15get_image_width21ocl_image1d_buffer_wo(ptr addrspace(4) [[IMG]])68; CHECK-NEXT:    ret i32 [[CALL]]69;70entry:71  %call = tail call i32 @_Z15get_image_width21ocl_image1d_buffer_wo(ptr addrspace(4) %img)72  ret i32 %call73}74 75declare i32 @_Z15get_image_width21ocl_image1d_buffer_wo(ptr addrspace(4)) #176 77define i32 @test_get_image_width_rw_image1d_buffer_t(ptr addrspace(4) readnone %img) {78; CHECK-LABEL: define i32 @test_get_image_width_rw_image1d_buffer_t(79; CHECK-SAME: ptr addrspace(4) readnone [[IMG:%.*]]) {80; CHECK-NEXT:  [[ENTRY:.*:]]81; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 @_Z15get_image_width21ocl_image1d_buffer_rw(ptr addrspace(4) [[IMG]])82; CHECK-NEXT:    ret i32 [[CALL]]83;84entry:85  %call = tail call i32 @_Z15get_image_width21ocl_image1d_buffer_rw(ptr addrspace(4) %img)86  ret i32 %call87}88 89declare i32 @_Z15get_image_width21ocl_image1d_buffer_rw(ptr addrspace(4)) #190 91define i32 @test_get_image_width_ro_image2d_t(ptr addrspace(4) readnone %img) {92; CHECK-LABEL: define i32 @test_get_image_width_ro_image2d_t(93; CHECK-SAME: ptr addrspace(4) readnone [[IMG:%.*]]) {94; CHECK-NEXT:  [[ENTRY:.*:]]95; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 @_Z15get_image_width14ocl_image2d_ro(ptr addrspace(4) [[IMG]])96; CHECK-NEXT:    ret i32 [[CALL]]97;98entry:99  %call = tail call i32 @_Z15get_image_width14ocl_image2d_ro(ptr addrspace(4) %img)100  ret i32 %call101}102 103declare i32 @_Z15get_image_width14ocl_image2d_ro(ptr addrspace(4)) #1104 105define i32 @test_get_image_width_wo_image2d_t(ptr addrspace(4) readnone %img) {106; CHECK-LABEL: define i32 @test_get_image_width_wo_image2d_t(107; CHECK-SAME: ptr addrspace(4) readnone [[IMG:%.*]]) {108; CHECK-NEXT:  [[ENTRY:.*:]]109; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 @_Z15get_image_width14ocl_image2d_wo(ptr addrspace(4) [[IMG]])110; CHECK-NEXT:    ret i32 [[CALL]]111;112entry:113  %call = tail call i32 @_Z15get_image_width14ocl_image2d_wo(ptr addrspace(4) %img)114  ret i32 %call115}116 117declare i32 @_Z15get_image_width14ocl_image2d_wo(ptr addrspace(4)) #1118 119define i32 @test_get_image_width_rw_image2d_t(ptr addrspace(4) readnone %img) {120; CHECK-LABEL: define i32 @test_get_image_width_rw_image2d_t(121; CHECK-SAME: ptr addrspace(4) readnone [[IMG:%.*]]) {122; CHECK-NEXT:  [[ENTRY:.*:]]123; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 @_Z15get_image_width14ocl_image2d_rw(ptr addrspace(4) [[IMG]])124; CHECK-NEXT:    ret i32 [[CALL]]125;126entry:127  %call = tail call i32 @_Z15get_image_width14ocl_image2d_rw(ptr addrspace(4) %img)128  ret i32 %call129}130 131declare i32 @_Z15get_image_width14ocl_image2d_rw(ptr addrspace(4)) #1132 133define i32 @test_get_image_width_ro_image3d_t(ptr addrspace(4) readnone %img) {134; CHECK-LABEL: define i32 @test_get_image_width_ro_image3d_t(135; CHECK-SAME: ptr addrspace(4) readnone [[IMG:%.*]]) {136; CHECK-NEXT:  [[ENTRY:.*:]]137; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 @_Z15get_image_width14ocl_image3d_ro(ptr addrspace(4) [[IMG]])138; CHECK-NEXT:    ret i32 [[CALL]]139;140entry:141  %call = tail call i32 @_Z15get_image_width14ocl_image3d_ro(ptr addrspace(4) %img)142  ret i32 %call143}144 145declare i32 @_Z15get_image_width14ocl_image3d_ro(ptr addrspace(4)) #1146 147define i32 @test_get_image_width_wo_image3d_t(ptr addrspace(4) readnone %img) {148; CHECK-LABEL: define i32 @test_get_image_width_wo_image3d_t(149; CHECK-SAME: ptr addrspace(4) readnone [[IMG:%.*]]) {150; CHECK-NEXT:  [[ENTRY:.*:]]151; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 @_Z15get_image_width14ocl_image3d_wo(ptr addrspace(4) [[IMG]])152; CHECK-NEXT:    ret i32 [[CALL]]153;154entry:155  %call = tail call i32 @_Z15get_image_width14ocl_image3d_wo(ptr addrspace(4) %img)156  ret i32 %call157}158 159declare i32 @_Z15get_image_width14ocl_image3d_wo(ptr addrspace(4)) #1160 161define i32 @test_get_image_width_rw_image3d_t(ptr addrspace(4) readnone %img) {162; CHECK-LABEL: define i32 @test_get_image_width_rw_image3d_t(163; CHECK-SAME: ptr addrspace(4) readnone [[IMG:%.*]]) {164; CHECK-NEXT:  [[ENTRY:.*:]]165; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 @_Z15get_image_width14ocl_image3d_rw(ptr addrspace(4) [[IMG]])166; CHECK-NEXT:    ret i32 [[CALL]]167;168entry:169  %call = tail call i32 @_Z15get_image_width14ocl_image3d_rw(ptr addrspace(4) %img)170  ret i32 %call171}172 173declare i32 @_Z15get_image_width14ocl_image3d_rw(ptr addrspace(4)) #1174 175define i32 @test_get_image_width_ro_image1d_array_t(ptr addrspace(4) readnone %img) {176; CHECK-LABEL: define i32 @test_get_image_width_ro_image1d_array_t(177; CHECK-SAME: ptr addrspace(4) readnone [[IMG:%.*]]) {178; CHECK-NEXT:  [[ENTRY:.*:]]179; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 @_Z15get_image_width20ocl_image1d_array_ro(ptr addrspace(4) [[IMG]])180; CHECK-NEXT:    ret i32 [[CALL]]181;182entry:183  %call = tail call i32 @_Z15get_image_width20ocl_image1d_array_ro(ptr addrspace(4) %img)184  ret i32 %call185}186 187declare i32 @_Z15get_image_width20ocl_image1d_array_ro(ptr addrspace(4)) #1188 189define i32 @test_get_image_width_wo_image1d_array_t(ptr addrspace(4) readnone %img) {190; CHECK-LABEL: define i32 @test_get_image_width_wo_image1d_array_t(191; CHECK-SAME: ptr addrspace(4) readnone [[IMG:%.*]]) {192; CHECK-NEXT:  [[ENTRY:.*:]]193; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 @_Z15get_image_width20ocl_image1d_array_wo(ptr addrspace(4) [[IMG]])194; CHECK-NEXT:    ret i32 [[CALL]]195;196entry:197  %call = tail call i32 @_Z15get_image_width20ocl_image1d_array_wo(ptr addrspace(4) %img)198  ret i32 %call199}200 201declare i32 @_Z15get_image_width20ocl_image1d_array_wo(ptr addrspace(4)) #1202 203define i32 @test_get_image_width_rw_image1d_array_t(ptr addrspace(4) readnone %img) {204; CHECK-LABEL: define i32 @test_get_image_width_rw_image1d_array_t(205; CHECK-SAME: ptr addrspace(4) readnone [[IMG:%.*]]) {206; CHECK-NEXT:  [[ENTRY:.*:]]207; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 @_Z15get_image_width20ocl_image1d_array_rw(ptr addrspace(4) [[IMG]])208; CHECK-NEXT:    ret i32 [[CALL]]209;210entry:211  %call = tail call i32 @_Z15get_image_width20ocl_image1d_array_rw(ptr addrspace(4) %img)212  ret i32 %call213}214 215declare i32 @_Z15get_image_width20ocl_image1d_array_rw(ptr addrspace(4)) #1216 217define i32 @test_get_image_width_ro_image2d_array_t(ptr addrspace(4) readnone %img) {218; CHECK-LABEL: define i32 @test_get_image_width_ro_image2d_array_t(219; CHECK-SAME: ptr addrspace(4) readnone [[IMG:%.*]]) {220; CHECK-NEXT:  [[ENTRY:.*:]]221; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 @_Z15get_image_width20ocl_image2d_array_ro(ptr addrspace(4) [[IMG]])222; CHECK-NEXT:    ret i32 [[CALL]]223;224entry:225  %call = tail call i32 @_Z15get_image_width20ocl_image2d_array_ro(ptr addrspace(4) %img)226  ret i32 %call227}228 229declare i32 @_Z15get_image_width20ocl_image2d_array_ro(ptr addrspace(4)) #1230 231define i32 @test_get_image_width_wo_image2d_array_t(ptr addrspace(4) readnone %img) {232; CHECK-LABEL: define i32 @test_get_image_width_wo_image2d_array_t(233; CHECK-SAME: ptr addrspace(4) readnone [[IMG:%.*]]) {234; CHECK-NEXT:  [[ENTRY:.*:]]235; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 @_Z15get_image_width20ocl_image2d_array_wo(ptr addrspace(4) [[IMG]])236; CHECK-NEXT:    ret i32 [[CALL]]237;238entry:239  %call = tail call i32 @_Z15get_image_width20ocl_image2d_array_wo(ptr addrspace(4) %img)240  ret i32 %call241}242 243declare i32 @_Z15get_image_width20ocl_image2d_array_wo(ptr addrspace(4)) #1244 245define i32 @test_get_image_width_rw_image2d_array_t(ptr addrspace(4) readnone %img) {246; CHECK-LABEL: define i32 @test_get_image_width_rw_image2d_array_t(247; CHECK-SAME: ptr addrspace(4) readnone [[IMG:%.*]]) {248; CHECK-NEXT:  [[ENTRY:.*:]]249; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 @_Z15get_image_width20ocl_image2d_array_rw(ptr addrspace(4) [[IMG]])250; CHECK-NEXT:    ret i32 [[CALL]]251;252entry:253  %call = tail call i32 @_Z15get_image_width20ocl_image2d_array_rw(ptr addrspace(4) %img)254  ret i32 %call255}256 257declare i32 @_Z15get_image_width20ocl_image2d_array_rw(ptr addrspace(4)) #1258 259define i32 @test_get_image_width_ro_image2d_depth_t(ptr addrspace(4) readnone %img) {260; CHECK-LABEL: define i32 @test_get_image_width_ro_image2d_depth_t(261; CHECK-SAME: ptr addrspace(4) readnone [[IMG:%.*]]) {262; CHECK-NEXT:  [[ENTRY:.*:]]263; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 @_Z15get_image_width20ocl_image2d_depth_ro(ptr addrspace(4) [[IMG]])264; CHECK-NEXT:    ret i32 [[CALL]]265;266entry:267  %call = tail call i32 @_Z15get_image_width20ocl_image2d_depth_ro(ptr addrspace(4) %img)268  ret i32 %call269}270 271declare i32 @_Z15get_image_width20ocl_image2d_depth_ro(ptr addrspace(4)) #1272 273define i32 @test_get_image_width_wo_image2d_depth_t(ptr addrspace(4) readnone %img) {274; CHECK-LABEL: define i32 @test_get_image_width_wo_image2d_depth_t(275; CHECK-SAME: ptr addrspace(4) readnone [[IMG:%.*]]) {276; CHECK-NEXT:  [[ENTRY:.*:]]277; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 @_Z15get_image_width20ocl_image2d_depth_wo(ptr addrspace(4) [[IMG]])278; CHECK-NEXT:    ret i32 [[CALL]]279;280entry:281  %call = tail call i32 @_Z15get_image_width20ocl_image2d_depth_wo(ptr addrspace(4) %img)282  ret i32 %call283}284 285declare i32 @_Z15get_image_width20ocl_image2d_depth_wo(ptr addrspace(4)) #1286 287define i32 @test_get_image_width_rw_image2d_depth_t(ptr addrspace(4) readnone %img) {288; CHECK-LABEL: define i32 @test_get_image_width_rw_image2d_depth_t(289; CHECK-SAME: ptr addrspace(4) readnone [[IMG:%.*]]) {290; CHECK-NEXT:  [[ENTRY:.*:]]291; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 @_Z15get_image_width20ocl_image2d_depth_rw(ptr addrspace(4) [[IMG]])292; CHECK-NEXT:    ret i32 [[CALL]]293;294entry:295  %call = tail call i32 @_Z15get_image_width20ocl_image2d_depth_rw(ptr addrspace(4) %img)296  ret i32 %call297}298 299declare i32 @_Z15get_image_width20ocl_image2d_depth_rw(ptr addrspace(4)) #1300 301define i32 @test_get_image_width_ro_image2d_array_depth_t(ptr addrspace(4) readnone %img) {302; CHECK-LABEL: define i32 @test_get_image_width_ro_image2d_array_depth_t(303; CHECK-SAME: ptr addrspace(4) readnone [[IMG:%.*]]) {304; CHECK-NEXT:  [[ENTRY:.*:]]305; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 @_Z15get_image_width26ocl_image2d_array_depth_ro(ptr addrspace(4) [[IMG]])306; CHECK-NEXT:    ret i32 [[CALL]]307;308entry:309  %call = tail call i32 @_Z15get_image_width26ocl_image2d_array_depth_ro(ptr addrspace(4) %img)310  ret i32 %call311}312 313declare i32 @_Z15get_image_width26ocl_image2d_array_depth_ro(ptr addrspace(4)) #1314 315define i32 @test_get_image_width_wo_image2d_array_depth_t(ptr addrspace(4) readnone %img) {316; CHECK-LABEL: define i32 @test_get_image_width_wo_image2d_array_depth_t(317; CHECK-SAME: ptr addrspace(4) readnone [[IMG:%.*]]) {318; CHECK-NEXT:  [[ENTRY:.*:]]319; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 @_Z15get_image_width26ocl_image2d_array_depth_wo(ptr addrspace(4) [[IMG]])320; CHECK-NEXT:    ret i32 [[CALL]]321;322entry:323  %call = tail call i32 @_Z15get_image_width26ocl_image2d_array_depth_wo(ptr addrspace(4) %img)324  ret i32 %call325}326 327declare i32 @_Z15get_image_width26ocl_image2d_array_depth_wo(ptr addrspace(4)) #1328 329define i32 @test_get_image_width_rw_image2d_array_depth_t(ptr addrspace(4) readnone %img) {330; CHECK-LABEL: define i32 @test_get_image_width_rw_image2d_array_depth_t(331; CHECK-SAME: ptr addrspace(4) readnone [[IMG:%.*]]) {332; CHECK-NEXT:  [[ENTRY:.*:]]333; CHECK-NEXT:    [[CALL:%.*]] = tail call i32 @_Z15get_image_width26ocl_image2d_array_depth_rw(ptr addrspace(4) [[IMG]])334; CHECK-NEXT:    ret i32 [[CALL]]335;336entry:337  %call = tail call i32 @_Z15get_image_width26ocl_image2d_array_depth_rw(ptr addrspace(4) %img)338  ret i32 %call339}340 341declare i32 @_Z15get_image_width26ocl_image2d_array_depth_rw(ptr addrspace(4)) #1342