Skip to content

Commit

Permalink
Fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
mgehre-amd committed Aug 29, 2024
1 parent 2f8092a commit 4687888
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
6 changes: 6 additions & 0 deletions mlir/lib/Conversion/ArithToEmitC/ArithToEmitC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ Type adaptIntegralTypeSignedness(Type ty, bool needsUnsigned) {
return IntegerType::get(ty.getContext(), ty.getIntOrFloatBitWidth(),
signedness);
}
} else if (emitc::isPointerWideType(ty)) {
if (isa<emitc::SizeTType>(ty) != needsUnsigned) {
if (needsUnsigned)
return emitc::SizeTType::get(ty.getContext());
return emitc::PtrDiffTType::get(ty.getContext());
}
}
return ty;
}
Expand Down
20 changes: 0 additions & 20 deletions mlir/test/Conversion/FuncToEmitC/func-to-emitc.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ func.func @call(%arg0: i32) -> i32 {

// CHECK-LABEL: emitc.func private @return_i32(i32) -> i32 attributes {specifiers = ["extern"]}
func.func private @return_i32(%arg0: i32) -> i32
<<<<<<< HEAD

// -----

Expand Down Expand Up @@ -105,22 +104,3 @@ func.func @call() {
call @return_void() : () -> ()
return
}
||||||| 4bce270157f9
=======

// -----

// CHECK-LABEL: emitc.func private @return_void() attributes {specifiers = ["static"]}
// CHECK-NEXT: emitc.return
func.func private @return_void() {
return
}

// CHECK-LABEL: emitc.func @call()
// CHECK-NEXT: emitc.call @return_void() : () -> ()
// CHECK-NEXT: emitc.return
func.func @call() {
call @return_void() : () -> ()
return
}
>>>>>>> c012e487b724

0 comments on commit 4687888

Please sign in to comment.