Changes

Summary

  1. [X86][SLM] +1uop for PSHUFBrm xmm (details)
  2. [X86][SLM] Fix uops for PCLMULQDQ (details)
  3. [X86][SLM] Fix uops for PCMPISTR/PCMPISTR instructions (details)
  4. [X86][SLM] Fix BitTest+Set uops + port usage (details)
  5. [CostModel][X86] Add div/rem by negative power-of-2 constants (details)
  6. [fir] Add IfBuilder and utility functions (details)
  7. [CostModel][X86] Add mul by positive/negative power-of-2 constants tests (details)
Commit 498c7236bc763cdee7e7a26e4e411b05b32735c5 by llvm-dev
[X86][SLM] +1uop for PSHUFBrm xmm

Extra 1uop for folded pshufb ops, based off a recent llvm-exegesis capture and what Intel AoM / Agner reports as well.
The file was modifiedllvm/lib/Target/X86/X86ScheduleSLM.td
The file was modifiedllvm/test/tools/llvm-mca/X86/SLM/resources-ssse3.s
Commit 680afaaa5d922781f3ec379328853398890d403c by llvm-dev
[X86][SLM] Fix uops for PCLMULQDQ

Based off a recent llvm-exegesis capture and what Intel AoM / Agner reports as well.
The file was modifiedllvm/lib/Target/X86/X86ScheduleSLM.td
The file was modifiedllvm/test/tools/llvm-mca/X86/SLM/resources-pclmul.s
Commit 5ed5df480257d24f480f01d784ed7cfd6dd25858 by llvm-dev
[X86][SLM] Fix uops for PCMPISTR/PCMPISTR instructions

Based off a recent llvm-exegesis capture and what Intel AoM / Agner reports as well.
The file was modifiedllvm/test/tools/llvm-mca/X86/SLM/resources-sse42.s
The file was modifiedllvm/lib/Target/X86/X86ScheduleSLM.td
Commit 0bb32b1b2121ed9fb07e8e2af8333a58e0a487a3 by llvm-dev
[X86][SLM] Fix BitTest+Set uops + port usage

Both ports are required for BitTest ops. Update the uops counts + port usage based off the most recent llvm-exegesis captures and what Intel AoM / Agner reports as well.
The file was modifiedllvm/lib/Target/X86/X86ScheduleSLM.td
The file was modifiedllvm/test/tools/llvm-mca/X86/SLM/resources-x86_64.s
Commit dbf5dc89306964bb613463cbec1637c6f720fbed by llvm-dev
[CostModel][X86] Add div/rem by negative power-of-2 constants

We have backend optimizations for these (like we do for power-of-2 divisions), but currently the costmodel doesn't match them
The file was modifiedllvm/test/Analysis/CostModel/X86/rem.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/div.ll
Commit f17f694a0fcf8eae7de4e051678e47f15d7855ff by clementval
[fir] Add IfBuilder and utility functions

In order to reduct the size of D111337. The IfBuilder and the two
utility functions genIsNotNull and genIsNull have been extracted in
a separate patch with dedicated unittests.

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: Leporacanthicus

Differential Revision: https://reviews.llvm.org/D111796

Co-authored-by: Jean Perier <jperier@nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
The file was modifiedflang/include/flang/Optimizer/Builder/FIRBuilder.h
The file was modifiedflang/lib/Optimizer/Builder/FIRBuilder.cpp
The file was addedflang/unittests/Optimizer/Builder/FIRBuilderTest.cpp
The file was modifiedflang/unittests/Optimizer/CMakeLists.txt
Commit dc3382dc2c12bd48227361e7f32a37df418f9f5a by llvm-dev
[CostModel][X86] Add mul by positive/negative power-of-2 constants tests

We have backend optimizations for these, but currently the costmodel doesn't match them
The file was addedllvm/test/Analysis/CostModel/X86/mul.ll