-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
x86_64 regression: @bitCast to bool vectors produces incorrect results #26008
Copy link
Copy link
Closed
Labels
arch-x86_6464-bit x8664-bit x86backend-self-hostedbugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviormiscompilationThe compiler reports success but produces semantically incorrect code.The compiler reports success but produces semantically incorrect code.regressionIt worked in a previous version of Zig, but stopped working.It worked in a previous version of Zig, but stopped working.
Milestone
Metadata
Metadata
Assignees
Labels
arch-x86_6464-bit x8664-bit x86backend-self-hostedbugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviormiscompilationThe compiler reports success but produces semantically incorrect code.The compiler reports success but produces semantically incorrect code.regressionIt worked in a previous version of Zig, but stopped working.It worked in a previous version of Zig, but stopped working.
Zig Version
0.16.0-dev.1415+db622f14c (worked in 0.15.2)
Steps to Reproduce and Observed Behavior
Run the following Zig code that bitcasts a u3 to a bool vector:
Observe how it produces
falsein newer versions with the x86_64 backend:Expected Behavior
It should return true since all bits are set, this works in the llvm backend as well as the 0.15.2 x86_64 backend: