[llvm] [InstCombine] simplify `(X * C0) / (X * C1)` into `C0 / C1`. (PR #73204)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 7 22:49:25 PST 2023


================
@@ -1207,6 +1207,48 @@ Instruction *InstCombinerImpl::commonIDivTransforms(BinaryOperator &I) {
     }
   }
 
+  // (X * Y) / (X * Z) --> Y / X (and commuted variants)
----------------
dtcxzyw wrote:

```suggestion
  // (X * Y) / (X * Z) --> Y / Z (and commuted variants)
```

https://github.com/llvm/llvm-project/pull/73204


More information about the llvm-commits mailing list