[llvm] [GISel][CombinerHelper] Combine op(trunc(x), trunc(y)) -> trunc(op(x, y)) (PR #89023)
Dhruv Chawla via llvm-commits
llvm-commits at lists.llvm.org
Thu May 23 02:02:56 PDT 2024
================
@@ -3083,8 +3083,10 @@ bool CombinerHelper::matchHoistLogicOpWithSameOpcodeHands(
return false;
case TargetOpcode::G_ANYEXT:
case TargetOpcode::G_SEXT:
- case TargetOpcode::G_ZEXT: {
+ case TargetOpcode::G_ZEXT:
+ case TargetOpcode::G_TRUNC: {
// Match: logic (ext X), (ext Y) --> ext (logic X, Y)
+ // Match: logic (trunc X), (trunc Y) -> trunc (logic X, Y)
----------------
dc03-work wrote:
I will look into this.
https://github.com/llvm/llvm-project/pull/89023
More information about the llvm-commits
mailing list