[flang-commits] [flang] [Flang][MLIR] Add basic initial support for alloca and program address space handling in FIR->LLVMIR codegen (PR #77518)

via flang-commits flang-commits at lists.llvm.org
Wed Jan 10 06:11:33 PST 2024


================
@@ -1752,7 +1776,9 @@ func.func @no_reassoc(%arg0: !fir.ref<i32>) {
 // CHECK-LABEL: llvm.func @no_reassoc(
 // CHECK-SAME:                        %[[ARG0:.*]]: !llvm.ptr) {
 // CHECK:         %[[C1:.*]] = llvm.mlir.constant(1 : i64) : i64
-// CHECK:         %[[ALLOC:.*]] = llvm.alloca %[[C1]] x i32 : (i64) -> !llvm.ptr
+// GENERIC:       %[[ALLOC:.*]] = llvm.alloca %[[C1]] x i32 : (i64) -> !llvm.ptr
+// AMDGPU:        %[[AA:.*]] = llvm.alloca %[[C1]] x i32 : (i64) -> !llvm.ptr<5>
+// AMDGPU:        %[[ALLOC:.*]] = llvm.addrspacecast %[[AA]] : !llvm.ptr<5> to !llvm.ptr
----------------
agozillon wrote:

I can, but the other COMDAT/NO-COMDAT tests don't do so and I think most other tests tend to not break things up with spaces, and I feel it's easier to just check the prefixes than parse a lot of spaces when the spaces are used to differentiate breaks between tests / code in this lit test. I'm happy to make the change though, but would prefer to wait on a tie breaker opinion in this case, so that I don't change it and then have to change it back! :-) 

https://github.com/llvm/llvm-project/pull/77518


More information about the flang-commits mailing list