[all-commits] [llvm/llvm-project] 403792: [InstCombine] Add test for bitcast of unsized poin...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Jun 21 13:03:40 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 403792f91e822e580dd5dc65ad80d0977d4fd9e3
      https://github.com/llvm/llvm-project/commit/403792f91e822e580dd5dc65ad80d0977d4fd9e3
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-06-21 (Mon, 21 Jun 2021)

  Changed paths:
    M llvm/test/Transforms/InstCombine/bitcast.ll

  Log Message:
  -----------
  [InstCombine] Add test for bitcast of unsized pointer (NFC)

The bitcast should get folded into the select, but currently isn't
due to an incorrect early bailout.


  Commit: e2c2124a4b5bad9cf2a1e23a6aef1b2ad753f504
      https://github.com/llvm/llvm-project/commit/e2c2124a4b5bad9cf2a1e23a6aef1b2ad753f504
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-06-21 (Mon, 21 Jun 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
    M llvm/test/Transforms/Coroutines/coro-retcon-once-value.ll
    M llvm/test/Transforms/InstCombine/bitcast.ll

  Log Message:
  -----------
  Reapply [InstCombine] Extract bitcast -> gep transform

Relative to the original patch, an InstCombine test has been
added to show a previously missed pattern, and the Coroutine
test that resulted in the revert has been regenerated.

-----

Move this into a separate function, to make sure that early
returns do not accidentally skip other transforms. This previously
happened for the isSized() check, which skipped folds like
distributing a bitcast over a select.


Compare: https://github.com/llvm/llvm-project/compare/7e2d672a672c...e2c2124a4b5b


More information about the All-commits mailing list