File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -354,9 +354,7 @@ class OpenACCClauseCIREmitter final
354354 llvm::APInt value =
355355 clause.getIntExpr ()->EvaluateKnownConstInt (cgf.cgm .getASTContext ());
356356
357- if (value.getBitWidth () != 64 )
358- value = value.sext (64 );
359-
357+ value = value.sextOrTrunc (64 );
360358 operation.setCollapseForDeviceTypes (builder.getContext (),
361359 lastDeviceTypeValues, value);
362360 } else {
@@ -381,8 +379,8 @@ class OpenACCClauseCIREmitter final
381379 } else {
382380 llvm::APInt curValue =
383381 e->EvaluateKnownConstInt (cgf.cgm .getASTContext ());
384- values.push_back (
385- createConstantInt ( exprLoc, 64 , curValue.getSExtValue ()));
382+ values.push_back (createConstantInt (
383+ exprLoc, 64 , curValue. sextOrTrunc ( 64 ) .getSExtValue ()));
386384 }
387385 }
388386
You can’t perform that action at this time.
0 commit comments