================
@@ -815,6 +815,7 @@ void ReductionCodeGen::emitAggregateType(CodeGenFunction 
&CGF, unsigned N) {
     Size = CGF.Builder.CreatePtrDiff(ElemType,
                                      OrigAddresses[N].second.getPointer(CGF),
                                      OrigAddresses[N].first.getPointer(CGF));
+    Size = CGF.Builder.CreateZExtOrTrunc(Size, CGF.Int64Ty);
----------------
arichardson wrote:

Should this be using the `ElemSizeOf` type since we are multiplying with that 
instead of hardcoding Int64Ty? In case getSizeOf changes in the future?
```suggestion
    Size = CGF.Builder.CreateZExtOrTrunc(Size, ElemSizeOf->getType());
```

https://github.com/llvm/llvm-project/pull/181855
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to