[PATCH] D136396: [X86] Enable reassociation for ADD instructions
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 21 06:49:11 PDT 2022
RKSimon added inline comments.
================
Comment at: llvm/test/CodeGen/X86/reassociate-add.ll:2
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -mtriple=x86_64-unknown-unknown -mcpu=x86-64 < %s | FileCheck %s
+
----------------
Drop -mcpu=x86-64
Pre-commit these test with current codegen to trunk and rebase to show the patch diffs.
================
Comment at: llvm/test/CodeGen/X86/reassociate-add.ll:4
+
+; This file checks the reassociation of ADD instruction.
+; The two ADD instructions add v0,v1,t2 together. t2 has a long dependence
----------------
pengfei wrote:
> No idea if we intended to not do reassociation in ADD instructions.
> Is there problem when unexpected overflow/underflow may be generated during reassociation?
Not that I can think of - EFLAGS will be the same and we already handles the $dst=$src0 constraint
================
Comment at: llvm/test/CodeGen/X86/xmulo.ll:1871
; WIN32-NEXT: setne %al
-; WIN32-NEXT: addl $12, %esp
+; WIN32-NEXT: addl $16, %esp
; WIN32-NEXT: popl %esi
----------------
Annoying - normally I'd expect reassociation to help us reduce stack use
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136396/new/
https://reviews.llvm.org/D136396
More information about the llvm-commits
mailing list