Changes

Summary

  1. Use dyn_cast_or_null instead of dyn_cast in FunctionLike::verifyTrait (NFC) (details)
  2. [NFC][X86][Codegen] Add shuffle test that would benefit from sorting in reduceBuildVecToShuffle() (details)
  3. Simplify getArgAttrDict/getResultAttrDict by removing unnecessary checks (details)
Commit 8bc1ce0f61da0b2d0c3a17aec898df7001336ea5 by joker.eph
Use dyn_cast_or_null instead of dyn_cast in FunctionLike::verifyTrait (NFC)

This is making the verifier more tolerant to cases where a "null"
Attribute would be inserted in the array of func arguments/results
attributes.
The file was modifiedmlir/include/mlir/IR/FunctionSupport.h
Commit 2db64e199aa3b48d3495da3620c8cdb045da94f3 by lebedev.ri
[NFC][X86][Codegen] Add shuffle test that would benefit from sorting in reduceBuildVecToShuffle()
The file was modifiedllvm/test/CodeGen/X86/oddshuffles.ll
Commit 152c9871e6ac7ba2a14dcc64e812b79193421846 by joker.eph
Simplify getArgAttrDict/getResultAttrDict by removing unnecessary checks

There is a slight change in behavior: if the arg dictionnary is empty
then we return this empty dictionnary instead of a null attribute.
This is more consistent with accessing it through:

  ArrayAttr args_attr = func_op.getAllArgAttrs();
  args_attr[num].cast<DictionnaryAttr>() ...

Differential Revision: https://reviews.llvm.org/D104189
The file was modifiedmlir/lib/IR/FunctionSupport.cpp