[PATCH] D94813: [MergeICmps] Don't merge icmps derived from pointers with addressspaces

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 25 20:34:49 PST 2021


MaskRay added inline comments.


================
Comment at: llvm/test/Transforms/MergeICmps/addressspaces.ll:2
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt < %s -mergeicmps -S | FileCheck %s
+
----------------
Add a file-level header about the purpose.


================
Comment at: llvm/test/Transforms/MergeICmps/addressspaces.ll:8
+
+define void @juliaAS([2 x [5 x i64]] addrspace(11)* nocapture nonnull readonly align 8 dereferenceable(80) %0, [2 x [5 x i64]] addrspace(11)* nocapture nonnull readonly align 8 dereferenceable(80) %1) {
+; CHECK-LABEL: @juliaAS(
----------------
Nit: Use named arguments and values. You could use gep-references-bb.ll as an example. I took some time to write meaningful names.


================
Comment at: llvm/test/Transforms/MergeICmps/addressspaces.ll:47
+
+L70:                                              ; preds = %top
+  %10 = load i64, i64 addrspace(11)* %3, align 8
----------------
Nit: Replace the labels with more meaningful ones.


================
Comment at: llvm/test/Transforms/MergeICmps/addressspaces.ll:64
+
+!llvm.module.flags = !{!0}
+
----------------
Delete unused metadata.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94813



More information about the llvm-commits mailing list