[PATCH] D19697: SROA assertion: creating bitcast between ptr types with different addr spaces

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 30 17:40:58 PDT 2016


sanjoy requested changes to this revision.
sanjoy added a comment.
This revision now requires changes to proceed.

The code looks fine, have a few minor nits on the test case.


================
Comment at: test/Transforms/SROA/pr27557.ll:1
@@ +1,2 @@
+; RUN: opt < %s -sroa -S | FileCheck %s
+
----------------
@chandlerc 's suggestion of putting this in `address-spaces.ll` still stands.  To make the PR number obvious, I'd suggest renaming `@testKernel` to `@pr27557` instead.

================
Comment at: test/Transforms/SROA/pr27557.ll:3
@@ +2,3 @@
+
+; ModuleID = '<origin>'
+target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
----------------
You can probably remove the `ModuleID` bit.

================
Comment at: test/Transforms/SROA/pr27557.ll:11
@@ +10,3 @@
+
+; CHECK: %[[CAST:.*]] = bitcast i32 addrspace(1)** {{.*}} to i32 addrspace(3)**
+; CHECK: store i32 addrspace(3)* @l, i32 addrspace(3)** %[[CAST]]
----------------
These show up inside the the optimized `testKernel`, right?  If so, I'd suggest:

```
; CHECK-LABEL: @testKernel(
< your CHECK: lines >
```



http://reviews.llvm.org/D19697





More information about the llvm-commits mailing list