OSDN Git Service

[X86] Add test case to show failure to combine away negates that may be created by...
authorCraig Topper <craig.topper@intel.com>
Tue, 24 Jul 2018 18:36:46 +0000 (18:36 +0000)
committerCraig Topper <craig.topper@intel.com>
Tue, 24 Jul 2018 18:36:46 +0000 (18:36 +0000)
commita3de0cbb8f4d886a968d20a8c6a6e8aa01d28c2a
tree70eeab614e725f9f6bef40357127786a91c482f6
parent3e6b79abab22983838916fccecf8d8060ea17115
[X86] Add test case to show failure to combine away negates that may be created by mul by constant expansion.

Mul by constant can expand to a sequence that ends with a negate. If the next instruction is an add or sub we might be able to fold the negate away.

We currently fail to do this because we explicitly don't add anything to the DAG combine worklist when we expand multiplies. This is primarily to keep the multipy from being reformed, but we should consider adding the users to worklist.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337843 91177308-0d34-0410-b5e6-96231b3b80d8
test/CodeGen/X86/mul-constant-i32.ll