-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
regression: @divExact no longer emits *div exact LLVM IR #19527
Copy link
Copy link
Closed
Labels
backend-llvmThe LLVM backend outputs an LLVM IR Module.The LLVM backend outputs an LLVM IR Module.bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorregressionIt 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
backend-llvmThe LLVM backend outputs an LLVM IR Module.The LLVM backend outputs an LLVM IR Module.bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorregressionIt worked in a previous version of Zig, but stopped working.It worked in a previous version of Zig, but stopped working.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Zig Version
0.12.0-dev.3518+d2be725e4
Steps to Reproduce and Observed Behavior
https://godbolt.org/z/zEhYTY1h9
because of
@divExacts semantics with safety disabled this should be turned into a shift which happened until 0.12 where it emits%1 = sdiv i32 %0, 2LLVM IR rather than%1 = ashr exact i32 %0, 1Expected Behavior
zig should emit a right shift to llvm in unsafe modes