[PATCH] D117026: GlobalISel: Fix CSEMIRBuilder mishandling constant folds of vectors

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 11 07:47:00 PST 2022


arsenm created this revision.
arsenm added reviewers: aemerson, paquette, dsanders, aditya_nandakumar, foad, Petar.Avramovic.
Herald added subscribers: kerbowa, hiraditya, rovka, nhaehnle, jvesely.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

This was ignoring the requested result register, resulting in a
missing def when this happened in the IRTranslator. Fixes some crashes
and verifier errors at -O0.

      

Alternatively we could pass DstOps to the constant fold functions.


https://reviews.llvm.org/D117026

Files:
  llvm/include/llvm/CodeGen/GlobalISel/Utils.h
  llvm/lib/CodeGen/GlobalISel/CSEMIRBuilder.cpp
  llvm/lib/CodeGen/GlobalISel/Utils.cpp
  llvm/test/CodeGen/AMDGPU/GlobalISel/combiner-crash.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-constant-fold-vector-op.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-getelementptr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117026.398953.patch
Type: text/x-patch
Size: 7549 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220111/05c7e4e3/attachment.bin>


More information about the llvm-commits mailing list