[all-commits] [llvm/llvm-project] d9f5d7: [InstCombine] Extract bitcast -> gep transform

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


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d9f5d7b959de36085944d4a99a73f3053f953796
      https://github.com/llvm/llvm-project/commit/d9f5d7b959de36085944d4a99a73f3053f953796
  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

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

Move this into a separate function, to make sure that early
returns do not accidentally skip other transforms. There is
already one isSized() check that could run into this issue,
thus this change is not strictly NFC.


  Commit: 5780611d7e044ef56c4214df2c236ef5e15545ab
      https://github.com/llvm/llvm-project/commit/5780611d7e044ef56c4214df2c236ef5e15545ab
  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
    A llvm/test/Transforms/InstCombine/opaque-ptr.ll

  Log Message:
  -----------
  [InstCombine] Don't try converting opaque pointer bitcast to GEP

Bitcasts having opaque pointer source or result type cannot be
converted into a zero-index GEP, GEP source and result types
always have the same opaque-ness.


Compare: https://github.com/llvm/llvm-project/compare/ea23c38d0605...5780611d7e04


More information about the All-commits mailing list