We have some common pattern like max(min(x, -128),127) to quantize a value to int8_t in AI.
And these two patterns should be the same: max(min(x, -128),127), min(max(x, -128), 127)
Maybe we can add a pattern for it?
https://alive2.llvm.org/ce/z/WjmAjz