check plan: ninja check-llvm-codegen-x86
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/X86/X86LegalizerInfo.cpp | ||
---|---|---|
389 | This isn't correct - CTPOP/LZCNT support is provided by Subtarget.hasPOPCNT/hasLZCNT respectively |
I was also unsure about the availability, but Wikipedia claims:
https://en.wikipedia.org/wiki/X86_Bit_manipulation_instruction_set
ABM is implemented by SSE4.2 and ABM is popcount and lzcnt.
It should be possible to disable the generation of these instructions by passing -mno-popcnt / -mno-lzcnt frontend option even if SSE4.2 is enabled.
llvm/lib/Target/X86/X86LegalizerInfo.cpp | ||
---|---|---|
394 | Additionally, don't we need to guard against 32-bit triples where s64 isn't legal? |
Don't trust wikipedia - it might be that all SSE4.2 cpus are known to support ABM as well, but its not under the same feature flags inside llvm (or the same cpuid bits on actual cpus), and AMD in fact support it with older cpus.
This isn't correct - CTPOP/LZCNT support is provided by Subtarget.hasPOPCNT/hasLZCNT respectively