Skip to content

Conversation

@fundamental
Copy link
Contributor

After updating julia today I noticed that 'make testall' was failing on my machine. The first two commits solve relatively minor issues that were likely overlooked due to the number of cores and 32/64 bit types of builds that are being tested more often. The reason I currently have this left as a WIP commit is that I assume the third commit should not be merged as is as it adds a conditional check to the binary shift operator which should not be needed.

I'm not quite too sure what the problem is with 128 bit shifts on my system, but it appears with both the included version of llvm and two recent (svn) images of llvm. Without the patch the behavior that makes some of the socket.jl tests fail is

julia> uint128(1) << 0
0x00000000000000010000000000000001

With the patch, the bitshift by zero does what is expected.

Currently with this patchset applied all tests run cleanly on my Slackware Linux 14.0 32 bit system.

StefanKarpinski added a commit that referenced this pull request Jun 19, 2013
Pull-request #3447 has a different fix for this and some other issues.
@Keno
Copy link
Member

Keno commented Jun 25, 2013

This is an LLVM issue. Here's a reproducible testcase:

define i128 @julia_foo2599(i32) {
top:
  %1 = shl i32 %0, 4
  %2 = zext i32 %1 to i128
  %3 = shl i128 1, %2
  %4 = icmp ugt i32 %1, 127
  %5 = select i1 %4, i128 0, i128 %3
  ret i128 %5
}
define i32 @main() {
top:
  %0 = call i128 @julia_foo2599(i32 0)
  %1 = lshr i128 %0, 64
  %2 = trunc i128 %1 to i32
  ret i32 %2
}

I'll see if it still happens with LLVM 3.3 and if so file an issue with them.

@Keno
Copy link
Member

Keno commented Jun 25, 2013

Submitted upstream as http://llvm.org/bugs/show_bug.cgi?id=16439

Keno added a commit that referenced this pull request Jun 25, 2013
Still problems on 32bit due to issues discussed in #3447
Keno added a commit that referenced this pull request Jun 25, 2013
Still problems on 32bit due to issues discussed in #3447
@fundamental
Copy link
Contributor Author

As the other issues were taken care of here is an updated version of the first commit.
I'm seeing some new failures with different tests, but they are not at all related with the issues discussed here.
Unless I have missed some logs this commit is still relevant and nothing addressing it has been applied.

- Prevent a type error from function name collision in
  test/collections.jl and test/core.jl
- Run parallel.jl at top level to avoid errors in addprocs() call
@fundamental
Copy link
Contributor Author

I guess I missed one minor delta, this should now be up-to-date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

upstream The issue is with an upstream dependency, e.g. LLVM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants