forked from OSchip/llvm-project
Disable named attribute in ODG for ArgOrResultElementTypeIs as was taking address of r-value.
-- PiperOrigin-RevId: 250805965
This commit is contained in:
parent
3650df50dd
commit
9c430353ae
|
@ -83,7 +83,8 @@ def ArgAndResHaveFixedElementTypesOp :
|
|||
Or<[And<[ArgOrResultElementTypeIs<"x", I32>,
|
||||
ArgOrResultElementTypeIs<"y", F32>,
|
||||
ArgOrResultElementTypeIs<"res", I16>]>,
|
||||
ArgOrResultElementTypeIs<"attr", I8>]>>]> {
|
||||
// TODO(jpienaar): change back to attr.
|
||||
ArgOrResultElementTypeIs<"x", I8>]>>]> {
|
||||
let arguments = (ins AnyVectorOrTensor:$x, AnyVectorOrTensor:$y, AnyAttr:$attr);
|
||||
let results = (outs AnyVectorOrTensor:$res);
|
||||
}
|
||||
|
|
|
@ -89,11 +89,12 @@ func @fixed_element_types(%arg0: tensor<* x i32>, %arg1: tensor<* x f32>) {
|
|||
|
||||
// -----
|
||||
|
||||
// CHECK-LABEL: @fixed_element_types
|
||||
func @fixed_element_types(%arg0: tensor<* x i32>, %arg1: tensor<* x f32>) {
|
||||
%0 = "test.arg_and_res_have_fixed_element_types"(%arg0, %arg1) {attr: splat<tensor<2xi8>, 1>}: (tensor<* x i32>, tensor<* x f32>) -> tensor<* x i32>
|
||||
return
|
||||
}
|
||||
// TODO(jpienaar): re-enable post supporting attributes again.
|
||||
// DISABLED_CHECK-LABEL: @fixed_element_types
|
||||
//func @fixed_element_types(%arg0: tensor<* x i32>, %arg1: tensor<* x f32>) {
|
||||
// %0 = "test.arg_and_res_have_fixed_element_types"(%arg0, %arg1) {attr: splat<tensor<2xi8>, 1>}: (tensor<* x i32>, tensor<* x f32>) -> tensor<* x i32>
|
||||
// return
|
||||
//}
|
||||
|
||||
// -----
|
||||
|
||||
|
|
|
@ -911,9 +911,7 @@ void OpEmitter::genVerifier() {
|
|||
auto &body = method.body();
|
||||
|
||||
// Populate substitutions for attributes and named operands and results.
|
||||
for (const auto &namedAttr : op.getAttributes())
|
||||
verifyCtx.addSubst(namedAttr.name,
|
||||
formatv("(&this->getAttr(\"{0}\"))", namedAttr.name));
|
||||
// TODO(jpienaar): Add attributes back.
|
||||
for (int i = 0, e = op.getNumOperands(); i < e; ++i) {
|
||||
auto &value = op.getOperand(i);
|
||||
// Skip from from first variadic operands for now. Else getOperand index
|
||||
|
|
Loading…
Reference in New Issue