[PATCH] D52669: [X86] Improve test instruction shrinking when the sign flag is used and the output of the and is truncated
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 29 09:22:42 PDT 2018
craig.topper added inline comments.
================
Comment at: lib/Target/X86/X86ISelDAGToDAG.cpp:3408
+ (!(Mask & 0x80) || CmpVT == MVT::i8 ||
+ hasNoSignedComparisonUses(Node))) {
// For example, convert "testl %eax, $8" to "testb %al, $8"
----------------
RKSimon wrote:
> Possible to pull this repeated hasNoSignedComparisonUses(Node) call out?
It contains a for loop over uses so I'd rather only call it when it necessary.
================
Comment at: test/CodeGen/X86/test-shrink.ll:693
+; CHECK-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; CHECK-X86-NEXT: testb $-128, %al
; CHECK-X86-NEXT: jg .LBB15_2
----------------
RKSimon wrote:
> Missed folding opportunity ?
Yes this is the missed folding alluded to in the summary. I don't think its unique to this change. I'll add a FIXME.
https://reviews.llvm.org/D52669
More information about the llvm-commits
mailing list