Fix lane-swapping on pairwise big endian Neon intrinsic#2087
Fix lane-swapping on pairwise big endian Neon intrinsic#2087folkertdev merged 3 commits intorust-lang:mainfrom
Conversation
|
r? @sayantn rustbot has assigned @sayantn. Use Why was this reviewer chosen?The reviewer was selected based on:
|
| pub fn to_c_type(&self) -> String { | ||
| let prefix = if self.ty.constant { "const " } else { "" }; | ||
| format!("{prefix}{}", self.ty.c_type()) | ||
| self.ty.c_type() |
There was a problem hiding this comment.
you've now removed the "const " prefix in both cases (here and in c_type), is that right?
There was a problem hiding this comment.
Yep, it should be handled by generate_c_constraint_blocks() now, and this avoids a warning about const const appearing in the output
| .map(|(idx, arg)| { | ||
| format!( | ||
| "{indentation}{ty} {name} = cast<{ty}>({load}(&{name}_vals[i]));\n", | ||
| "{indentation}{ty} {name} = cast<{ty}>({load}(&{name}_vals[i+{idx}]));\n", |
There was a problem hiding this comment.
to be clear, not using idx before was a bug right?
There was a problem hiding this comment.
Doing it this way (ensuring that two inputs to the intrinsic aren't always equal) provides a bit of extra coverage and should slightly reduce runtime. Just an oversight that we never did it this way originally
This PR also includes some minor improvements to intrinsic-test