]> granicus.if.org Git - llvm/commit
[TargetLowering] add tests to show effect of setcc sub->shift; NFC
authorSanjay Patel <spatel@rotateright.com>
Sat, 9 Feb 2019 17:03:59 +0000 (17:03 +0000)
committerSanjay Patel <spatel@rotateright.com>
Sat, 9 Feb 2019 17:03:59 +0000 (17:03 +0000)
commit70a10441b95ef578d92b2bd6e5d29bc8b3a6af04
treeed70292165c2a6ff576748a1ea3d9880224123b5
parent04e18cd6ef2b70b210ae2610de3ffb8dc6570567
[TargetLowering] add tests to show effect of setcc sub->shift; NFC

There's effectively no difference for the cases with variables.
We just trade a sub for an add on those. But the case with a
subtract from constant would require an extra move instruction
on x86, so this looks like a reasonable generic combine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353619 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/TargetLowering.cpp
test/CodeGen/X86/setcc-combine.ll