Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flang/include/flang/Optimizer/Builder/HLFIRTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class Entity : public mlir::Value {
bool isSimplyContiguous() const {
// If this can be described without a fir.box in FIR, this must
// be contiguous.
if (!hlfir::isBoxAddressOrValueType(getFirBase().getType()) || isScalar())
if (!hlfir::isBoxAddressOrValueType(getFirBase().getType()))
return true;
// Otherwise, if this entity has a visible declaration in FIR,
// or is the dereference of an allocatable or contiguous pointer
Expand Down
10 changes: 0 additions & 10 deletions flang/test/HLFIR/assign-codegen.fir
Original file line number Diff line number Diff line change
Expand Up @@ -427,13 +427,3 @@ func.func @test_upoly_expr_assignment(%arg0: !fir.class<!fir.array<?xnone>> {fir
// CHECK: }
// CHECK: return
// CHECK: }

func.func @test_scalar_box(%arg0: f32, %arg1: !fir.box<!fir.ptr<f32>>) {
hlfir.assign %arg0 to %arg1 : f32, !fir.box<!fir.ptr<f32>>
return
}
// CHECK-LABEL: func.func @test_scalar_box(
// CHECK-SAME: %[[VAL_0:.*]]: f32,
// CHECK-SAME: %[[VAL_1:.*]]: !fir.box<!fir.ptr<f32>>) {
// CHECK: %[[VAL_2:.*]] = fir.box_addr %[[VAL_1]] : (!fir.box<!fir.ptr<f32>>) -> !fir.ptr<f32>
// CHECK: fir.store %[[VAL_0]] to %[[VAL_2]] : !fir.ptr<f32>