[all-commits] [llvm/llvm-project] b6c8fe: [NFC] [PowerPC] Remove dead code in BUILD_VECTOR p...
Qiu Chaofan via All-commits
all-commits at lists.llvm.org
Mon Jan 4 19:36:27 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b6c8feb29fce39121884f7e08ec6eb0f58da3fb7
https://github.com/llvm/llvm-project/commit/b6c8feb29fce39121884f7e08ec6eb0f58da3fb7
Author: Qiu Chaofan <qiucofan at cn.ibm.com>
Date: 2021-01-05 (Tue, 05 Jan 2021)
Changed paths:
M llvm/lib/Target/PowerPC/PPCISelLowering.cpp
Log Message:
-----------
[NFC] [PowerPC] Remove dead code in BUILD_VECTOR peephole
The piece of code tries to use splat+shift to lower build_vector with
repeating bit pattern. And immediate field of vector splat is only 5
bits (-16~15). It iterates over them one by one to find which
shifts/rotates to number in build_vector.
This patch removes code to try matching constant with algebraic
right-shift because that's meaningless - any negative number's algebraic
right-shift won't produce result smaller than itself. Besides, code
(int)((unsigned)i >> j) means logical shift-right in C.
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D93937
More information about the All-commits
mailing list