You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i1 true is used as an index, SExt extends it to i32 -1. This would cause BitVector to overflow.
This can be a quick fix by using ZExt over SExt, as we have specified in the language manual that the index shall be treated as an unsigned number. (https://llvm.org/docs/LangRef.html#insertelement-instruction)
The text was updated successfully, but these errors were encountered:
When i1 true is used as an index, SExt extends it to i32 -1. This would cause BitVector to overflow.
This can be a quick fix by using ZExt over SExt, as we have specified in the language manual that the index shall be treated as an unsigned number. (https://llvm.org/docs/LangRef.html#insertelement-instruction)
DataCorrupted
added a commit
to SecurityLab-UCD/llvm-project
that referenced
this issue
Mar 18, 2024
When i1 true is used as an index, SExt extends it to i32 -1. This would
cause BitVector to overflow.
The language manual have specified that the index shall be treated as an
unsigned number, this patch fixes that.
(https://llvm.org/docs/LangRef.html#insertelement-instruction)
This patch fixes#85717
---------
Signed-off-by: Peter Rong <PeterRong96@gmail.com>
chencha3
pushed a commit
to chencha3/llvm-project
that referenced
this issue
Mar 23, 2024
…5718)
When i1 true is used as an index, SExt extends it to i32 -1. This would
cause BitVector to overflow.
The language manual have specified that the index shall be treated as an
unsigned number, this patch fixes that.
(https://llvm.org/docs/LangRef.html#insertelement-instruction)
This patch fixesllvm#85717
---------
Signed-off-by: Peter Rong <PeterRong96@gmail.com>
Reproduction
https://godbolt.org/z/P97TT7fEs
Cause
When
i1 true
is used as an index, SExt extends it toi32 -1
. This would cause BitVector to overflow.This can be a quick fix by using ZExt over SExt, as we have specified in the language manual that the index shall be treated as an unsigned number. (https://llvm.org/docs/LangRef.html#insertelement-instruction)
The text was updated successfully, but these errors were encountered: