Differential D107891 Diff 365754 mlir/test/Conversion/StandardToLLVM/convert-nd-vector-to-llvmir.mlir
Changeset View
Changeset View
Standalone View
Standalone View
mlir/test/Conversion/StandardToLLVM/convert-nd-vector-to-llvmir.mlir
Show First 20 Lines • Show All 174 Lines • ▼ Show 20 Lines | func @shru_vector(%arg0 : vector<1x2x3xi64>) -> vector<1x2x3xi64> { | ||||
// CHECK: llvm.insertvalue %{{.*}}, %{{.*}}[0, 0] : !llvm.array<1 x array<2 x vector<3xi64>>> | // CHECK: llvm.insertvalue %{{.*}}, %{{.*}}[0, 0] : !llvm.array<1 x array<2 x vector<3xi64>>> | ||||
// CHECK: llvm.extractvalue %{{.*}}[0, 1] : !llvm.array<1 x array<2 x vector<3xi64>>> | // CHECK: llvm.extractvalue %{{.*}}[0, 1] : !llvm.array<1 x array<2 x vector<3xi64>>> | ||||
// CHECK: llvm.lshr %{{.*}}, %{{.*}} : vector<3xi64> | // CHECK: llvm.lshr %{{.*}}, %{{.*}} : vector<3xi64> | ||||
// CHECK: llvm.insertvalue %{{.*}}, %{{.*}}[0, 1] : !llvm.array<1 x array<2 x vector<3xi64>>> | // CHECK: llvm.insertvalue %{{.*}}, %{{.*}}[0, 1] : !llvm.array<1 x array<2 x vector<3xi64>>> | ||||
%c1 = constant dense<1> : vector<1x2x3xi64> | %c1 = constant dense<1> : vector<1x2x3xi64> | ||||
%0 = shift_right_unsigned %arg0, %c1 : vector<1x2x3xi64> | %0 = shift_right_unsigned %arg0, %c1 : vector<1x2x3xi64> | ||||
return %0 : vector<1x2x3xi64> | return %0 : vector<1x2x3xi64> | ||||
} | } | ||||
// ----- | |||||
// CHECK-LABEL: @bitcast_2d | |||||
func @bitcast_2d(%arg0: vector<2x4xf32>) { | |||||
// CHECK: llvm.mlir.undef | |||||
// CHECK: llvm.extractvalue %{{.*}}[0] | |||||
// CHECK: llvm.bitcast %{{.*}} : vector<4xf32> to vector<4xi32> | |||||
// CHECK: llvm.insertvalue %{{.*}}, %{{.*}}[0] | |||||
// CHECK: llvm.extractvalue %{{.*}}[1] | |||||
// CHECK: llvm.bitcast %{{.*}} : vector<4xf32> to vector<4xi32> | |||||
// CHECK: llvm.insertvalue %{{.*}}, %{{.*}}[1] | |||||
std.bitcast %arg0 : vector<2x4xf32> to vector<2x4xi32> | |||||
return | |||||
} |