Commit 1d739ffb authored by Chandler Carruth's avatar Chandler Carruth Committed by Pirama Arumuga Nainar
Browse files

[x86] Switch EFLAGS copy lowering to use reg-reg form of testing for

a zero register.

Previously I tried this and saw LLVM unable to transform this to fold
with memory operands such as spill slot rematerialization. However, it
clearly works as shown in this patch. We turn these into `cmpb $0,
<mem>` when useful for folding a memory operand without issue. This form
has no disadvantage compared to `testb $-1, <mem>`. So overall, this is
likely no worse and may be slightly smaller in some cases due to the
`testb %reg, %reg` form.

Differential Revision: https://reviews.llvm.org/D45475

Change-Id: I162029e7a214e2dbeefa34c4f77558ee041042c8
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330269 91177308-0d34-0410-b5e6-96231b3b80d8
parent 395a2619
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment