[all-commits] [llvm/llvm-project] a8072a: [InstCombine] Eliminate icmp+zext pairs over phis ...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Tue Jan 7 00:29:58 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a8072a0b4ebd5cd1fb3958629cd453910691f6d3
https://github.com/llvm/llvm-project/commit/a8072a0b4ebd5cd1fb3958629cd453910691f6d3
Author: Nikita Popov <npopov at redhat.com>
Date: 2025-01-07 (Tue, 07 Jan 2025)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
M llvm/test/Transforms/InstCombine/phi.ll
Log Message:
-----------
[InstCombine] Eliminate icmp+zext pairs over phis more aggressively (#121767)
When folding icmp over phi, add a special case for `icmp eq (zext(bool),
0)`, which is known to fold to `!bool` and thus won't increase the
instruction count. This helps convert more phis to i1, esp. in loops.
This is based on existing logic we have to support this for icmp of
ucmp/scmp.
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