Skip to content

Commit 0950ec7

Browse files
committed
Remove unnecessary bitcast
1 parent 337a67d commit 0950ec7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/builder.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1125,10 +1125,10 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
11251125
// `int → volatile int __attribute__((aligned(1)))` is not. This seems
11261126
// like a bug in libgccjit. The easiest way to work around this is to
11271127
// bitcast `val` to have the matching qualifiers.
1128-
val = self.cx.context.new_bitcast(None, val, modified_destination_type);
1128+
//val = self.cx.context.new_bitcast(None, val, modified_destination_type);
11291129

11301130
let modified_ptr =
1131-
self.cx.context.new_bitcast(None, ptr, modified_destination_type.make_pointer());
1131+
self.cx.context.new_cast(None, ptr, modified_destination_type.make_pointer());
11321132
let modified_destination = modified_ptr.dereference(None);
11331133
self.llbb().add_assignment(None, modified_destination, val);
11341134
// TODO(antoyo): handle `MemFlags::NONTEMPORAL`.

0 commit comments

Comments
 (0)