Skip to content

Conversation

jcbeyler
Copy link

The loop1 method is too simple for LLVM, which then makes it return just 5.
Though this proves that the code is correct, we probably want to have the
code generation all the same.

This patch makes the code a bit different but at least the compiler can no
longer optimize it all away.

@jcbeyler
Copy link
Author

This seemed to have problems before so I might have to go and fix them :)

Copy link
Member

Choose a reason for hiding this comment

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

This is doubling $i on each iteration, so the expected result would be something like 2^8, no?

Copy link
Member

Choose a reason for hiding this comment

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

Ah, sorry, nevermind, I misread the break condition.

@rossberg
Copy link
Member

LGTM

@sunfishcode
Copy link
Member

What would you think about just adding the new more complex loop as a new test, rather than replacing the existing test? I think there's value in both.

@jcbeyler
Copy link
Author

Done, I added a loop3 then

rossberg and others added 6 commits November 20, 2015 19:06
The loop1 method is too simple for LLVM, which then makes it return just 5.
Though this proves that the code is correct, we probably want to have the
  code generation all the same.

This patch makes a loop3 method based on loop1 so that the code ais  bit
  different but at least the compiler can no longer optimize it all away.

We've left loop1 to show the difference in compiler technologies
@jcbeyler
Copy link
Author

let me do this again...

@jcbeyler jcbeyler closed this Nov 21, 2015
ngzhian pushed a commit to ngzhian/spec that referenced this pull request Nov 4, 2021
- Fix mistake tests in simd_load.wast
- Missing lane index should be malformed
- Test more values of lane index
ngzhian pushed a commit to ngzhian/spec that referenced this pull request Nov 4, 2021
dhil pushed a commit to dhil/webassembly-spec that referenced this pull request Oct 3, 2023
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.

3 participants