[all-commits] [llvm/llvm-project] 3c9083: Fix i1 vector reduction miscompilation
Sp00ph via All-commits
all-commits at lists.llvm.org
Thu Apr 20 15:27:17 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3c9083f6757cbaf6f8d6c601586d99a11faf642e
https://github.com/llvm/llvm-project/commit/3c9083f6757cbaf6f8d6c601586d99a11faf642e
Author: Sp00ph <markuseverling at gmail.com>
Date: 2023-04-20 (Thu, 20 Apr 2023)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
M llvm/test/CodeGen/AArch64/illegal-floating-point-vector-compares.ll
M llvm/test/CodeGen/AArch64/reduce-and.ll
M llvm/test/CodeGen/AArch64/reduce-or.ll
M llvm/test/CodeGen/AArch64/sve-fixed-length-ptest.ll
M llvm/test/CodeGen/AArch64/vecreduce-and-legalization.ll
M llvm/test/CodeGen/AArch64/vecreduce-umax-legalization.ll
Log Message:
-----------
Fix i1 vector reduction miscompilation
Previously, `vecreduce_{and,or} vNi1` could lead to miscompilations because the legalizer first decides to `any_ext` the operand (which is correct for `vecreduce_{and,or}`) and then decides to use `vecreduce_u{min,max}` instead (for which `any_ext` is incorrect). This patch changes it so the `vecreduce_u{min,max}` operations use `sign_ext` instead of `any_ext`.
Issue: https://github.com/llvm/llvm-project/issues/62211
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D148672
More information about the All-commits
mailing list