Error: Instruction does not dominate all uses!
Renato
renato at athaydes.com
Tue Jan 9 20:40:48 UTC 2024
I was writing some pretty basic stuff when suddenly my code
stopped compiling with LDC on release mode.
I got the commit which introduced the problem:
https://github.com/renatoathaydes/dzipper/commit/2f2cd6f2b00d36129a97446bec25e660baef3187
Basically, I started using the `std.datetime.systime` module.
With DMD, I can still compile with release mode:
```
▶ dub build -c exe -b release
Starting Performing "release" build using
/Users/renato/dlang/dmd-2.106.1/osx/bin/dmd for x86_64.
Building console-colors 1.2.0: building configuration
[library]
Building dzipper ~main: building configuration [exe]
Linking dzipper
(dmd-2.106.1)
```
But with LDC, I get this error:
```
▶ dub build -c exe -b release
Starting Performing "release" build using
/Users/renato/dlang/ldc-1.35.0/bin/ldc2 for x86_64.
Up-to-date console-colors 1.2.0: target for configuration
[library] is up to date.
Building dzipper ~main: building configuration [exe]
Error: Instruction does not dominate all uses!
%93 = getelementptr inbounds i8, i8* %4, i64 12
%91 = bitcast i8* %93 to i32*
Instruction does not dominate all uses!
%30 = getelementptr inbounds i8, i8* %4, i64 10
%28 = bitcast i8* %30 to i32*
Error /Users/renato/dlang/ldc-1.35.0/bin/ldc2 failed with exit
code 1.
(ldc-1.35.0)
```
Without `-b release`, it works.
More information about the digitalmars-d-ldc
mailing list