[all-commits] [llvm/llvm-project] 03af1b: [SLP] Don't truncate compare constants that change...
aokblast via All-commits
all-commits at lists.llvm.org
Sun Jul 12 09:28:25 PDT 2026
Branch: refs/heads/users/aokblast/clang/slpv/fix_ext
Home: https://github.com/llvm/llvm-project
Commit: 03af1bf70067be1323deeed00d448d24780da57a
https://github.com/llvm/llvm-project/commit/03af1bf70067be1323deeed00d448d24780da57a
Author: ShengYi Hung <aokblast at FreeBSD.org>
Date: 2026-07-13 (Mon, 13 Jul 2026)
Changed paths:
M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
A llvm/test/Transforms/SLPVectorizer/X86/minbitwidth-icmp-signed-const-trunc.ll
Log Message:
-----------
[SLP] Don't truncate compare constants that change value at the demoted width
SLP preserves the original bit width when narrowing compare operands,
but doesn't always account for the required size convertion in LLVM IR.
This can produce incorrect compare constants after truncation.
Fix this by using getSignificantBits() for sign-extended operands,
forbidding truncation for signed predicates on zero-extended operands,
and checking the correct operand in the LBW > RBW case.
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