aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/PowerPC/const-splat-array-init.ll
diff options
context:
space:
mode:
authorguan jian <guanjian@stu.cdut.edu.cn>2025-09-29 16:53:50 +0800
committerGitHub <noreply@github.com>2025-09-29 09:53:50 +0100
commit8d57211d6f33513ccee911a5ac98d8a31d72dcde (patch)
tree94e19968de700f16cdf7977a928ab1c652233412 /llvm/test/CodeGen/PowerPC/const-splat-array-init.ll
parentedc76e15ed9bf4a55d866dcd7d6e196f793903d7 (diff)
downloadllvm-8d57211d6f33513ccee911a5ac98d8a31d72dcde.zip
llvm-8d57211d6f33513ccee911a5ac98d8a31d72dcde.tar.gz
llvm-8d57211d6f33513ccee911a5ac98d8a31d72dcde.tar.bz2
[LLVM][AArch64] Optimize sign bit tests with TST instruction for SIGN_EXTEND patterns (#158061)
Hi, I recently found out in some cases LLVM doesn't generate optimal code like: ``` sxtb w8, w0 cmp w8, #0 csel w0, w1, w2, lt ``` ``` tst w0, #0x80 csel w0, w1, w2, mi ``` This optimization is only applied when the following conditions are met: 1. The comparison is setlt (signed less than) 2. The right-hand side is zero 3. The left-hand side is a sign extension operation (SIGN_EXTEND or SIGN_EXTEND_INREG) 4. The sign-extended value has only one use (hasOneUse()) 5. The original type is an integer type
Diffstat (limited to 'llvm/test/CodeGen/PowerPC/const-splat-array-init.ll')
0 files changed, 0 insertions, 0 deletions