[X86] Enable reassociation for ADD instructions
authorGuozhi Wei <carrot@google.com>
Wed, 26 Oct 2022 00:46:13 +0000 (00:46 +0000)
committerGuozhi Wei <carrot@google.com>
Wed, 26 Oct 2022 00:46:13 +0000 (00:46 +0000)
commitd24c93cc4107dca68a2760199e970cb04cdeed90
tree5c6270a3784c8f92b85e256309308b4b77cf2ee5
parente5d9e802e50dd55a326e31a0d562e5263b208f3b
[X86] Enable reassociation for ADD instructions

ADD is an associative and commutative operation, so we can do reassociation for it.

Differential Revision: https://reviews.llvm.org/D136396
58 files changed:
llvm/lib/Target/X86/X86InstrInfo.cpp
llvm/test/CodeGen/X86/2009-03-23-MultiUseSched.ll
llvm/test/CodeGen/X86/DynamicCalleeSavedRegisters.ll
llvm/test/CodeGen/X86/add-sub-bool.ll
llvm/test/CodeGen/X86/alias-static-alloca.ll
llvm/test/CodeGen/X86/avx512-intrinsics-x86_64.ll
llvm/test/CodeGen/X86/avx512-intrinsics.ll
llvm/test/CodeGen/X86/avx512-regcall-Mask.ll
llvm/test/CodeGen/X86/avx512-regcall-NoMask.ll
llvm/test/CodeGen/X86/avx512bw-intrinsics-upgrade.ll
llvm/test/CodeGen/X86/div-rem-pair-recomposition-signed.ll
llvm/test/CodeGen/X86/div-rem-pair-recomposition-unsigned.ll
llvm/test/CodeGen/X86/divide-by-constant.ll
llvm/test/CodeGen/X86/divmod128.ll
llvm/test/CodeGen/X86/fold-add.ll
llvm/test/CodeGen/X86/fold-tied-op.ll
llvm/test/CodeGen/X86/h-registers-1.ll
llvm/test/CodeGen/X86/hipe-cc.ll
llvm/test/CodeGen/X86/hipe-cc64.ll
llvm/test/CodeGen/X86/imul.ll
llvm/test/CodeGen/X86/lea-opt-cse4.ll
llvm/test/CodeGen/X86/lea-opt2.ll
llvm/test/CodeGen/X86/lrshrink.ll
llvm/test/CodeGen/X86/midpoint-int.ll
llvm/test/CodeGen/X86/misched-balance.ll
llvm/test/CodeGen/X86/misched-matrix.ll
llvm/test/CodeGen/X86/mul-constant-i16.ll
llvm/test/CodeGen/X86/mul-constant-i32.ll
llvm/test/CodeGen/X86/mul-constant-i64.ll
llvm/test/CodeGen/X86/mul-i1024.ll
llvm/test/CodeGen/X86/mul-i256.ll
llvm/test/CodeGen/X86/mul-i512.ll
llvm/test/CodeGen/X86/mul128.ll
llvm/test/CodeGen/X86/mul64.ll
llvm/test/CodeGen/X86/muloti.ll
llvm/test/CodeGen/X86/popcnt.ll
llvm/test/CodeGen/X86/pr34080-2.ll
llvm/test/CodeGen/X86/pr36865.ll
llvm/test/CodeGen/X86/reassociate-add.ll
llvm/test/CodeGen/X86/smul-with-overflow.ll
llvm/test/CodeGen/X86/smul_fix.ll
llvm/test/CodeGen/X86/smul_fix_sat.ll
llvm/test/CodeGen/X86/smulo-128-legalisation-lowering.ll
llvm/test/CodeGen/X86/sse-regcall.ll
llvm/test/CodeGen/X86/stack-clash-large.ll
llvm/test/CodeGen/X86/statepoint-live-in.ll
llvm/test/CodeGen/X86/statepoint-regs.ll
llvm/test/CodeGen/X86/swift-return.ll
llvm/test/CodeGen/X86/twoaddr-lea.ll
llvm/test/CodeGen/X86/umul-with-overflow.ll
llvm/test/CodeGen/X86/umul_fix.ll
llvm/test/CodeGen/X86/urem-seteq-nonzero.ll
llvm/test/CodeGen/X86/vec_smulo.ll
llvm/test/CodeGen/X86/vp2intersect_multiple_pairs.ll
llvm/test/CodeGen/X86/win-smallparams.ll
llvm/test/CodeGen/X86/x86-cmov-converter.ll
llvm/test/CodeGen/X86/x86-no_caller_saved_registers-preserve.ll
llvm/test/CodeGen/X86/xmulo.ll