OSDN Git Service

[X86] Correct the immediate cost for 'add/sub i64 %x, 0x80000000'.
authorCraig Topper <craig.topper@intel.com>
Sat, 28 Jul 2018 18:21:46 +0000 (18:21 +0000)
committerCraig Topper <craig.topper@intel.com>
Sat, 28 Jul 2018 18:21:46 +0000 (18:21 +0000)
commite192af49a170ac54aadc8cb75b9e88ac2d54e937
treead48c0775e846c2357b6ff845d6abae87292d24e
parentb03e51dff43dfebcbe5496d9d148f14bcdd5c3cc
[X86] Correct the immediate cost for 'add/sub i64 %x, 0x80000000'.

X86 normally requires immediates to be a signed 32-bit value which would exclude i64 0x80000000. But for add/sub we can negate the constant and use the opposite instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338204 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86TargetTransformInfo.cpp