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 ir/instr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1886,7 +1886,7 @@ StateValue ConversionOp::toSMT(State &s) const {
break;
case BitCast:
// NOP: ptr vect -> ptr vect
if (getType().isVectorType() &&
if (getType().isVectorType() && val->getType().isVectorType() &&
getType().getAsAggregateType()->getChild(0).isPtrType())
return v;

Expand Down
11 changes: 11 additions & 0 deletions tests/alive-tv/bitcast/ptr-vec1.srctgt.ll
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
define <1 x ptr> @src(ptr %p, ptr %v) {
store ptr %v, ptr %p
%l = load <1 x ptr>, ptr %p
ret <1 x ptr> %l
}

define <1 x ptr> @tgt(ptr %p, ptr %v) {
store ptr %v, ptr %p
%l = bitcast ptr %v to <1 x ptr>
ret <1 x ptr> %l
}
Loading