This is another step towards being able to canonicalize to the funnel shift intrinsics in IR (see D49242 for the initial patch). We should not have any loss of simplification power in IR between these and the equivalent IR constructs.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Analysis/ConstantFolding.cpp | ||
---|---|---|
2096 ↗ | (On Diff #161039) | Can we use APInt::urem(uint64_t) version here since bitwidth is guaranteed 32-bits? Then your ShAmt would be unsigned. Then LshrAmt and ShlAmt can be unsigned. And we get rid of a lot of temporary APInts which could save heap allocations if bit width is more than 64. |