[all-commits] [llvm/llvm-project] b0d27e: IR: Fix use-list-order round-tripping for br

Duncan P. N. Exon Smith via All-commits all-commits at lists.llvm.org
Mon Jun 28 12:53:55 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b0d27eb069159e21c3b62cdf011937739950eafc
      https://github.com/llvm/llvm-project/commit/b0d27eb069159e21c3b62cdf011937739950eafc
  Author: Duncan P. N. Exon Smith <dexonsmith at apple.com>
  Date:   2021-06-28 (Mon, 28 Jun 2021)

  Changed paths:
    M llvm/lib/IR/Instructions.cpp
    A llvm/test/Assembler/br-single-destination.ll

  Log Message:
  -----------
  IR: Fix use-list-order round-tripping for br

Fix the use-list-order for br instructions by setting the operands in
order of their index to match the use-list-order prediction. The case
where this matters is when there is a condition but the if-true and
if-false branches are identical.

Bug was found when reviewing failures pointed at by
https://reviews.llvm.org/D104950. Fix is similar to
3cf415c6c367ced43175ebd1dc4bd9582c7f5376.

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




More information about the All-commits mailing list