[llvm-dev] Redundant promotion of integer values in x86 target
Taewook Oh via llvm-dev
llvm-dev at lists.llvm.org
Fri Jan 29 21:04:12 PST 2016
Hello,
While looking at some internal benchmarks, I found that llvm generates codes with redundant promotion, something like:
xor %al, %cl
movzbl %cl, %ecx
cmp $0x20, %ecx
I believe that the promotion stems from the logic in X86TargetLowering::EmitCmp. Comments in the code says,
"Do the comparison at i32 if it's smaller, besides the Atom case. This avoids subregister aliasing issues. Keep the smaller reference if we're optimizing for size, however, as that'll allow better folding of memory operations."
Can anybody please explain me more in detail about the subregister aliasing issues?
Thanks,
Taewook
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160130/f9f64237/attachment.html>
More information about the llvm-dev
mailing list