[PATCH] D44128: [GISel]: Add helpers for easy building G_FCONSTANT along with matchers

Aditya Nandakumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 5 17:55:57 PST 2018


aditya_nandakumar created this revision.
aditya_nandakumar added reviewers: qcolombet, volkan, dsanders, rovka, ab.

Added helpers to build G_FCONSTANT, along with matching ConstantFP and unit tests for the same.

Sample usage.

  auto MIB = Builder.buildFConstant(DstReg, 0.5, s32); // Build IEEESingle

For Matching the above

  const ConstantFP* Tmp;
  mi_match(DstReg, MRI, m_GFCst(Tmp));


Repository:
  rL LLVM

https://reviews.llvm.org/D44128

Files:
  include/llvm/CodeGen/GlobalISel/MIPatternMatch.h
  include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
  include/llvm/CodeGen/GlobalISel/Utils.h
  lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
  lib/CodeGen/GlobalISel/Utils.cpp
  unittests/CodeGen/GlobalISel/PatternMatchTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44128.137108.patch
Type: text/x-patch
Size: 6561 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180306/95b34b67/attachment.bin>


More information about the llvm-commits mailing list