[PATCH] D129025: [SimplifyCFG] Skip hoisting common instructions that return token type

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 4 01:59:32 PDT 2022


nikic added a reviewer: efriedma.
nikic added a comment.

Don't think we have a clear understanding of the transforms that are valid for token types, but this generally looks reasonable to me. We should avoid making token values flow across control flow edges, even if it does not require introducing a phi.



================
Comment at: llvm/test/Transforms/LowerMatrixIntrinsics/transpose-opts.ll:975
 ; CHECK-NEXT:    [[TMP18:%.*]] = extractelement <2 x float> [[TMP6]], i64 1
-; CHECK-NEXT:    [[TMP19:%.*]] = insertelement <2 x float> poison float [[TMP18]], i64 0
+; CHECK-NEXT:    [[TMP19:%.*]] = insertelement <2 x float> poison, float [[TMP18]], i64 0
 ; CHECK-NEXT:    [[TMP20:%.*]] = extractelement <2 x float> [[TMP13]], i64 1
----------------
Unrelated change? Feel free to commit separately.


================
Comment at: llvm/test/Transforms/SimplifyCFG/hoist-skip-token.ll:4
+; CHECK: call token @llvm.coro.save(ptr null)
+; CHECK: call token @llvm.coro.save(ptr null)
+
----------------
Use update_test_checks please.


================
Comment at: llvm/test/Transforms/SimplifyCFG/hoist-skip-token.ll:36
+  ret void
+}
----------------
It should be possible to simplify this test further, e.g. the outer loop structure doesn't really seem relevant here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129025/new/

https://reviews.llvm.org/D129025



More information about the llvm-commits mailing list