diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2024-08-13 12:48:04 +0100 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2024-08-13 12:48:27 +0100 |
commit | ed7ad0a1a0584f90a211ca5a87bc46968e169e5d (patch) | |
tree | 904dbf3ab7cedf9c1daa570a39ad0f3112dc25f2 /llvm/lib/CodeGen/TargetPassConfig.cpp | |
parent | dc8c217db6329f03a116ef63dafa6de02913d311 (diff) | |
download | llvm-ed7ad0a1a0584f90a211ca5a87bc46968e169e5d.zip llvm-ed7ad0a1a0584f90a211ca5a87bc46968e169e5d.tar.gz llvm-ed7ad0a1a0584f90a211ca5a87bc46968e169e5d.tar.bz2 |
[X86] Promote cttz_i32(x) -> cttz_i64((i64)x | (1 << 32)) (#102900) (REAPPLIED)
On 64bit targets we can promote i32 CTTZ nodes to i64 CTTZ_ZERO_UNDEF by setting the 32nd bit.
#57811 also queried about whether we should use BTS instead of MOVABS+OR to avoid a i64 immediate - I'm willing to tweak the DAGToDAG isel peephole for these cases if reviewers think it worthwhile. But most recent CPUs can actually handle MOVABS faster than BTS/C/R.......
Reapplied with missing costmodel changes - the cost tables can probably be improved in a follow up patch.
Fixes #57811
Diffstat (limited to 'llvm/lib/CodeGen/TargetPassConfig.cpp')
0 files changed, 0 insertions, 0 deletions