Cherry pick https://github.com/llvm/llvm-project/commit/cb40d5291e6113fddcfa5fc3861b7320f78dbfe8 (#11144)
Cherry pick https://github.com/llvm/llvm-project/commit/cb40d5291e6113fddcfa5fc3861b7320f78dbfe8 (#11144)


google/iree,iree-org/iree,iree-org/iree,iree-org/iree,iree-org/iree,google/iree,google/iree,google/iree,google/iree,google/iree,iree-org/iree,google/iree,iree-org/iree,iree-org/iree