Mark x86's V_SET0 and V_SETALLONES with isSimpleLoad, and teach X86's
authorDan Gohman <gohman@apple.com>
Wed, 3 Dec 2008 05:21:24 +0000 (05:21 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 3 Dec 2008 05:21:24 +0000 (05:21 +0000)
commit62c939d7d5572e57963a5f26fb6fe802e13dc0bf
tree40550321fe3caaaa7a081dc7d7ce4faa4339e234
parentb3cf03cee1ce45a0b774bc8a8057ff7931a53215
Mark x86's V_SET0 and V_SETALLONES with isSimpleLoad, and teach X86's
foldMemoryOperand how to "fold" them, by converting them into constant-pool
loads. When they aren't folded, they use xorps/cmpeqd, but for example when
register pressure is high, they may now be folded as memory operands, which
reduces register pressure.

Also, mark V_SET0 isAsCheapAsAMove so that two-address-elimination will
remat it instead of copying zeros around (V_SETALLONES was already marked).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60461 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/Target.td
include/llvm/Target/TargetInstrDesc.h
lib/Target/X86/X86InstrInfo.cpp
lib/Target/X86/X86InstrSSE.td
test/CodeGen/X86/fold-pcmpeqd-0.ll [new file with mode: 0644]
test/CodeGen/X86/fold-pcmpeqd-1.ll [new file with mode: 0644]
utils/TableGen/CodeGenDAGPatterns.cpp