[all-commits] [llvm/llvm-project] 91e807: [X86] Teach PostprocessISelDAG to fold ANDrm+TESTr...
Craig Topper via All-commits
all-commits at lists.llvm.org
Wed Aug 3 21:03:15 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 91e8079cd535a736cb6aabd24fc310a8ec46a07f
https://github.com/llvm/llvm-project/commit/91e8079cd535a736cb6aabd24fc310a8ec46a07f
Author: Craig Topper <craig.topper at sifive.com>
Date: 2022-08-03 (Wed, 03 Aug 2022)
Changed paths:
M llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
M llvm/test/CodeGen/X86/cmp.ll
Log Message:
-----------
[X86] Teach PostprocessISelDAG to fold ANDrm+TESTrr when chain result is used.
The isOnlyUserOf prevented the fold if the chain result had any
users. What we really care about is the the data result from the
AND is only used by the TEST, and the flags results from the ANDs
aren't used at all. It's ok if the chain has users, we just need
to replace those users with the chain from the TESTrm.
Reviewed By: LuoYuanke
Differential Revision: https://reviews.llvm.org/D131117
More information about the All-commits
mailing list