[all-commits] [llvm/llvm-project] 0a913b: [X86] Fold some (truncate (srl (add X, C1), C2)) p...
João Gouveia via All-commits
all-commits at lists.llvm.org
Fri Feb 21 01:17:31 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0a913b5e3a234d3261ccca54f9458715c00fae3b
https://github.com/llvm/llvm-project/commit/0a913b5e3a234d3261ccca54f9458715c00fae3b
Author: João Gouveia <jtalonegouveia at gmail.com>
Date: 2025-02-21 (Fri, 21 Feb 2025)
Changed paths:
M llvm/lib/Target/X86/X86ISelLowering.cpp
A llvm/test/CodeGen/X86/combine-i64-trunc-srl-add.ll
Log Message:
-----------
[X86] Fold some (truncate (srl (add X, C1), C2)) patterns to (add (truncate (srl X, C2)), C1') (#126448)
Addresses the poor codegen identified in #123239 and a few extra cases.
This transformation is correct for `eq`
(https://alive2.llvm.org/ce/z/qZhwtT), `ne`
(https://alive2.llvm.org/ce/z/6gsmNz), `ult`
(https://alive2.llvm.org/ce/z/xip_td) and `ugt`
(https://alive2.llvm.org/ce/z/39XQkX).
Fixes #123239
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list