[all-commits] [llvm/llvm-project] 53fece: [DAG] FoldConstantArithmetic - allow binop folding...
Simon Pilgrim via All-commits
all-commits at lists.llvm.org
Sun Jun 9 03:30:26 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 53fecef1ec5cb502900f82b07036b28cb0fb9f0f
https://github.com/llvm/llvm-project/commit/53fecef1ec5cb502900f82b07036b28cb0fb9f0f
Author: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: 2024-06-09 (Sun, 09 Jun 2024)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
M llvm/test/CodeGen/ARM/vector-store.ll
M llvm/test/CodeGen/X86/vshift-6.ll
Log Message:
-----------
[DAG] FoldConstantArithmetic - allow binop folding to work with differing bitcasted constants (#94863)
We currently only constant fold binop(bitcast(c1),bitcast(c2)) if c1 and c2 are both bitcasted and from the same type.
This patch relaxes this assumption to allow the constant build vector to originate from different types (and allow cases where only one operand was bitcasted).
We still ensure we bitcast back to one of the original types if both operand were bitcasted (we assume that if we have a non-bitcasted constant then its legal to keep using that type).
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list