Skip to content

Conversation

AnthonyLatsis
Copy link
Collaborator

@AnthonyLatsis AnthonyLatsis commented Aug 21, 2025

Follow-up to #81464. Fixes an assertion failure on 32-bit Windows.

The default value was flipped in llvm/llvm-project#114539.

Follow-up to #81464.
Fixes an assertion failure on 32-bit Windows.

The default value was flipped in
llvm/llvm-project#114539.
@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test

llvm::Constant *NegativeOne = llvm::Constant::getIntegerValue(
IntPtrTy, APInt(IntPtrTy->getBitWidth(), -2));
IntPtrTy, APInt(IntPtrTy->getBitWidth(), -2, /*isSigned*/ false,
/*implicitTrunc*/ true));
Copy link
Contributor

@rjmccall rjmccall Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should pass /*isSigned*/ true. If IntPtrTy->getBitWidth() were actually huge, we would in fact want this to be sign-extended, and it also fixes the assertion without needing to pass implicitTrunc because it's okay to truncate consistent sign bits. (This also means you can just make the change on main.)

Also, I don't think this is on you to fix, but how did we end up with a variable called NegativeOne that represents a value of -2?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

how did we end up with a variable called NegativeOne that represents a value of -2

68bc33fed32#diff-e3cb1b9416734345839b90f1c5ec26d9173d335e687abb007c9ec0b332b3d3e4

cc @compnerd

@AnthonyLatsis
Copy link
Collaborator Author

Superseded by #83854.

@AnthonyLatsis AnthonyLatsis deleted the jepa-rebranch branch August 21, 2025 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants