24 lines · plain
1// RUN: mlir-opt --split-input-file --remove-dead-values --mlir-print-op-generic %s | FileCheck %s --check-prefix=GEN2 3// -----4// Private callee: both args become dead after internal DCE; RDV drops callee5// args and shrinks the *args* segment on the call-site to zero; sizes kept in6// sync.7 8module {9 func.func private @callee(%x: i32, %y: i32) {10 %u = arith.addi %x, %x : i32 // %y is dead11 return12 }13 14 func.func @caller(%a: i32, %b: i32) {15 // args segment initially has 2 operands.16 "test.call_with_segments"(%a, %b) { callee = @callee,17 operandSegmentSizes = array<i32: 0, 2, 0> } : (i32, i32) -> ()18 return19 }20}21 22// GEN: "test.call_with_segments"() <{callee = @callee, operandSegmentSizes = array<i32: 0, 0, 0>}> : () -> ()23// ^ args shrank from 2 -> 024