-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
backend:AArch64good first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contributellvm:globaliselmissed-optimization
Description
SDAG, via these nodes can pattern-recognise and optimise hadd and rhadd nodes. We should add the same operations for global isel.
/// AVGFLOORS/AVGFLOORU - Averaging add - Add two integers using an integer of
/// type i[N+1], halving the result by shifting it one bit right.
/// shr(add(ext(X), ext(Y)), 1)
AVGFLOORS,
AVGFLOORU,
/// AVGCEILS/AVGCEILU - Rounding averaging add - Add two integers using an
/// integer of type i[N+2], add 1 and halve the result by shifting it one bit
/// right. shr(add(ext(X), ext(Y), 1), 1)
AVGCEILS,
AVGCEILU,
There are tests in, for example, llvm/test/CodeGen/AArch64/hadd-combine.ll.
https://godbolt.org/z/xGs95MGz5
Metadata
Metadata
Assignees
Labels
backend:AArch64good first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contributellvm:globaliselmissed-optimization