The handling for minimum value is similar to cttz/ctlz with 0 just above this case.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/Analysis/ConstantFolding/abs.ll | ||
---|---|---|
46 | (a silly question) abs with a vector input is optimized here, but this patch is about non-vector integers; do you have any idea which part of ConstantFolding.cpp is responsible for this? |
llvm/lib/Analysis/ConstantFolding.cpp | ||
---|---|---|
2858 | Vector types are handled by calling the scalar fold for each element. | |
llvm/test/Analysis/ConstantFolding/abs.ll | ||
46 | Not silly - I used the vector test to reduce the number of tests needed, and it's not obvious from just this patch how that works. :) |
LGTM
llvm/test/Analysis/ConstantFolding/abs.ll | ||
---|---|---|
46 | Thank you for the kind explanation! :) |
Vector types are handled by calling the scalar fold for each element.