MCPcopy Create free account
hub / github.com/NVIDIA/cuda-tile / tryFoldSelectSameOperands

Function tryFoldSelectSameOperands

lib/Dialect/CudaTile/IR/CudaTile.cpp:5191–5198  ·  view source on GitHub ↗

1) select c, x, x => x

Source from the content-addressed store, hash-verified

5189
5190// 1) select c, x, x => x
5191static OpFoldResult tryFoldSelectSameOperands(SelectOp op,
5192 SelectOp::FoldAdaptor adaptor) {
5193 Value t = op.getValIfTrue();
5194 Value f = op.getValIfFalse();
5195 if (t == f)
5196 return t;
5197 return {};
5198}
5199
5200// 2) select true, x, y => x
5201// select false, x, y => y

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected