[PATCH] [x86] Do not convert to cmp32 for Atom arch.
Sergey Okunev
sergey.k.okunev at gmail.com
Wed Feb 19 00:08:24 PST 2014
Hi grosbach,
Added 'Atom' check in 'X86TargetLowering::EmitCmp' func.
http://llvm-reviews.chandlerc.com/D2824
Files:
lib/Target/X86/X86ISelLowering.cpp
Index: lib/Target/X86/X86ISelLowering.cpp
===================================================================
--- lib/Target/X86/X86ISelLowering.cpp
+++ lib/Target/X86/X86ISelLowering.cpp
@@ -9774,12 +9774,14 @@
if ((Op0.getValueType() == MVT::i8 || Op0.getValueType() == MVT::i16 ||
Op0.getValueType() == MVT::i32 || Op0.getValueType() == MVT::i64)) {
- // Do the comparison at i32 if it's smaller. 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.
+ // 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.
if (Op0.getValueType() != MVT::i32 && Op0.getValueType() != MVT::i64 &&
!DAG.getMachineFunction().getFunction()->getAttributes().hasAttribute(
- AttributeSet::FunctionIndex, Attribute::MinSize)) {
+ AttributeSet::FunctionIndex, Attribute::MinSize) &&
+ !Subtarget->isAtom()) {
unsigned ExtendOp =
isX86CCUnsigned(X86CC) ? ISD::ZERO_EXTEND : ISD::SIGN_EXTEND;
Op0 = DAG.getNode(ExtendOp, dl, MVT::i32, Op0);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2824.1.patch
Type: text/x-patch
Size: 1332 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140219/5e192645/attachment.bin>
More information about the llvm-commits
mailing list