Changed the structure of the generated IR to make it easier to vectorize
It's probably generating pc since I'm using my desktop. I'll change it to unknown so it's not platform-specific.
It doesn't, I just thought it was cleaner and produced slightly smaller IR. It also more closely mimics the behavior of the -emit-llvm flag.
Same answer as above. Should I change these back?
Should %s be signed? Do we want unsigned compare here?
Seems like the endloop label is unnecessary. Does this help vectorize? If not, lets get rid of unconditional jumps to the next line.
This will make overflow undefined... Isn't that the opposite of what we want? That will permit LLVM to assume overflow never happens and modify the code in new ways based on that assumption.
I don't think it matters since %s will always be positive (it will always be equal to
I initially had it this way since that's how -emit-llvm generated the code. But it doesn't seem like it's necessary for loops to be vectorized upon further inspection.
That's a good point. It probably won't matter since this addition will never overflow (we're just starting at zero and incrementing by one). This is what was generated by -emit-llvm. I'll remove it to reduce confusion.